clang-tools 19.0.0git
Functions
clang::ast_matchers Namespace Reference

Functions

 AST_POLYMORPHIC_MATCHER (isInAbseilFile, AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt, TypeLoc, NestedNameSpecifierLoc))
 Matches AST nodes that were found within Abseil files.
 
 AST_MATCHER (Decl, declHasNoReturnAttr)
 matches a Decl if it has a "no return" attribute of any kind
 
 AST_MATCHER (FunctionType, typeHasNoReturnAttr)
 matches a FunctionType if the type includes the GNU no return attribute
 
 AST_MATCHER (Expr, isMacroID)
 
 AST_POLYMORPHIC_MATCHER_P2 (hasAnyArgumentWithParam, AST_POLYMORPHIC_SUPPORTED_TYPES(CallExpr, CXXConstructExpr), internal::Matcher< Expr >, ArgMatcher, internal::Matcher< ParmVarDecl >, ParamMatcher)
 
 AST_MATCHER (Expr, usedInBooleanContext)
 
 AST_MATCHER (CXXConstructExpr, isDefaultConstruction)
 
 AST_MATCHER (QualType, isIntegralType)
 
 AST_MATCHER_P (UserDefinedLiteral, hasLiteral, clang::ast_matchers::internal::Matcher< Expr >, InnerMatcher)
 

Function Documentation

◆ AST_MATCHER() [1/6]

clang::ast_matchers::AST_MATCHER ( CXXConstructExpr  ,
isDefaultConstruction   
)

Definition at line 89 of file ContainerSizeEmptyCheck.cpp.

References Node.

◆ AST_MATCHER() [2/6]

clang::ast_matchers::AST_MATCHER ( Decl  ,
declHasNoReturnAttr   
)

matches a Decl if it has a "no return" attribute of any kind

Definition at line 24 of file InfiniteLoopCheck.cpp.

References Node.

◆ AST_MATCHER() [3/6]

clang::ast_matchers::AST_MATCHER ( Expr  ,
isMacroID   
)

Definition at line 19 of file PreferIsaOrDynCastInConditionalsCheck.cpp.

References Node.

◆ AST_MATCHER() [4/6]

clang::ast_matchers::AST_MATCHER ( Expr  ,
usedInBooleanContext   
)

Definition at line 57 of file ContainerSizeEmptyCheck.cpp.

References Builder, and Node.

◆ AST_MATCHER() [5/6]

clang::ast_matchers::AST_MATCHER ( FunctionType  ,
typeHasNoReturnAttr   
)

matches a FunctionType if the type includes the GNU no return attribute

Definition at line 30 of file InfiniteLoopCheck.cpp.

References Node.

◆ AST_MATCHER() [6/6]

clang::ast_matchers::AST_MATCHER ( QualType  ,
isIntegralType   
)

Definition at line 93 of file ContainerSizeEmptyCheck.cpp.

References Node.

◆ AST_MATCHER_P()

clang::ast_matchers::AST_MATCHER_P ( UserDefinedLiteral  ,
hasLiteral  ,
clang::ast_matchers::internal::Matcher< Expr >  ,
InnerMatcher   
)

Definition at line 97 of file ContainerSizeEmptyCheck.cpp.

References Builder, and Node.

◆ AST_POLYMORPHIC_MATCHER()

clang::ast_matchers::AST_POLYMORPHIC_MATCHER ( isInAbseilFile  ,
AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt, TypeLoc, NestedNameSpecifierLoc)   
)

Matches AST nodes that were found within Abseil files.

Example matches Y but not X (matcher = cxxRecordDecl(isInAbseilFile())

#include "absl/strings/internal-file.h"
class X {};
int X

absl/strings/internal-file.h:

class Y {};

Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc>, Matcher<NestedNameSpecifierLoc>

Definition at line 30 of file AbseilMatcher.h.

References Loc, Node, and Path.

◆ AST_POLYMORPHIC_MATCHER_P2()

clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P2 ( hasAnyArgumentWithParam  ,
AST_POLYMORPHIC_SUPPORTED_TYPES(CallExpr, CXXConstructExpr)  ,
internal::Matcher< Expr >  ,
ArgMatcher  ,
internal::Matcher< ParmVarDecl >  ,
ParamMatcher   
)

Definition at line 22 of file ContainerSizeEmptyCheck.cpp.

References Builder, and Node.