diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -1283,6 +1283,21 @@ +
Matches the attribute(s) attached to a Stmt + +Given: + constexpr double pow(double x, long long n) noexcept { + if (n > 0) [[likely]] + return x * pow(x, n - 1); + else [[unlikely]] + return 1; + } +attributedStmt() matches "[[likely]] return ...;" and +"[[unlikely]] return 1;" +
Matches an Objective-C autorelease pool statement. @@ -2852,6 +2867,17 @@
Matches declaration that has a given attribute. + +Given + __attribute__((device)) void f() { ... } +decl(hasAttr(clang::attr::CUDADevice)) matches the function declaration of +f. If the matcher is used from clang-query, attr::Kind parameter should be +passed as a quoted string. e.g., hasAttr("attr::CUDADevice"). +
Matches an entity that has been implicitly added by the compiler (e.g. implicit default/copy constructors). @@ -6214,6 +6240,17 @@
Matches the statement an attribute is attached to. + +Example: + attributedStmt(hasSubStmt(returnStmt())) +would match "return 1;" here: + else [[unlikely]] + return 1; +
Matches AutoType nodes where the deduced type is a specific type. @@ -9799,5 +9836,3 @@