https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/207116
None >From 7fd5939af0846a208bbf35866bc3000e98fbe1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]> Date: Thu, 2 Jul 2026 06:45:34 +0200 Subject: [PATCH] [clang][docs] Add \code comments around code in doc comments --- clang/include/clang/AST/Decl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 2ea16d0ba6b03..88c900203630a 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -2599,6 +2599,7 @@ class FunctionDecl : public DeclaratorDecl, /// Determines whether this function is one of the replaceable /// global allocation functions: + /// \code /// void *operator new(size_t); /// void *operator new(size_t, const std::nothrow_t &) noexcept; /// void *operator new[](size_t); @@ -2609,6 +2610,7 @@ class FunctionDecl : public DeclaratorDecl, /// void operator delete[](void *) noexcept; /// void operator delete[](void *, std::size_t) noexcept; [C++1y] /// void operator delete[](void *, const std::nothrow_t &) noexcept; + /// \endcode /// These functions have special behavior under C++1y [expr.new]: /// An implementation is allowed to omit a call to a replaceable global /// allocation function. [...] @@ -2632,6 +2634,7 @@ class FunctionDecl : public DeclaratorDecl, /// or is a function that may be treated as such during constant evaluation. /// This adds support for potentially templated type aware global allocation /// functions of the form: + /// \code /// void *operator new(type-identity, std::size_t, std::align_val_t) /// void *operator new(type-identity, std::size_t, std::align_val_t, /// const std::nothrow_t &) noexcept; @@ -2646,6 +2649,7 @@ class FunctionDecl : public DeclaratorDecl, /// std::align_val_t) noexcept; /// void operator delete[](type-identity, void*, std::size_t, /// std::align_val_t, const std::nothrow_t&) noexcept; + /// \endcode /// Where `type-identity` is a specialization of std::type_identity. If the /// declaration is a templated function, it may not include a parameter pack /// in the argument list, the type-identity parameter is required to be _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
