#include "ASTMatchersTest.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
namespace clang {
namespace ast_matchers {
TEST_P(ASTMatchersTest, Decl_CXX) { … }
TEST_P(ASTMatchersTest, NameableDeclaration_MatchesVariousDecls) { … }
TEST_P(ASTMatchersTest, NamedDecl_CXX) { … }
TEST_P(ASTMatchersTest, MatchesNameRE) { … }
TEST_P(ASTMatchersTest, MatchesNameRE_CXX) { … }
TEST_P(ASTMatchersTest, DeclarationMatcher_MatchClass) { … }
TEST_P(ASTMatchersTest, TranslationUnitDecl) { … }
TEST_P(ASTMatchersTest, LinkageSpecDecl) { … }
TEST_P(ASTMatchersTest, ClassTemplateDecl_DoesNotMatchClass) { … }
TEST_P(ASTMatchersTest, ClassTemplateDecl_MatchesClassTemplate) { … }
TEST_P(ASTMatchersTest,
ClassTemplateDecl_DoesNotMatchClassTemplateExplicitSpecialization) { … }
TEST_P(ASTMatchersTest,
ClassTemplateDecl_DoesNotMatchClassTemplatePartialSpecialization) { … }
TEST(ASTMatchersTestCUDA, CUDAKernelCallExpr) { … }
TEST(ASTMatchersTestCUDA, HasAttrCUDA) { … }
TEST_P(ASTMatchersTest, ValueDecl) { … }
TEST_P(ASTMatchersTest, FriendDecl) { … }
TEST_P(ASTMatchersTest, EnumDecl_DoesNotMatchClasses) { … }
TEST_P(ASTMatchersTest, EnumDecl_MatchesEnums) { … }
TEST_P(ASTMatchersTest, EnumConstantDecl) { … }
TEST_P(ASTMatchersTest, TagDecl) { … }
TEST_P(ASTMatchersTest, TagDecl_CXX) { … }
TEST_P(ASTMatchersTest, UnresolvedLookupExpr) { … }
TEST_P(ASTMatchersTest, UsesADL) { … }
TEST_P(ASTMatchersTest, CallExpr_CXX) { … }
TEST_P(ASTMatchersTest, LambdaExpr) { … }
TEST_P(ASTMatchersTest, CXXForRangeStmt) { … }
TEST_P(ASTMatchersTest, CXXForRangeStmt_CXX11) { … }
TEST_P(ASTMatchersTest, SubstNonTypeTemplateParmExpr) { … }
TEST_P(ASTMatchersTest, NonTypeTemplateParmDecl) { … }
TEST_P(ASTMatchersTest, TemplateTypeParmDecl) { … }
TEST_P(ASTMatchersTest, TemplateTemplateParmDecl) { … }
TEST_P(ASTMatchersTest, UserDefinedLiteral) { … }
TEST_P(ASTMatchersTest, FlowControl) { … }
TEST_P(ASTMatchersTest, CXXOperatorCallExpr) { … }
TEST_P(ASTMatchersTest, FoldExpr) { … }
TEST_P(ASTMatchersTest, ThisPointerType) { … }
TEST_P(ASTMatchersTest, DeclRefExpr) { … }
TEST_P(ASTMatchersTest, CXXMemberCallExpr) { … }
TEST_P(ASTMatchersTest, UnaryExprOrTypeTraitExpr) { … }
TEST_P(ASTMatchersTest, AlignOfExpr) { … }
TEST_P(ASTMatchersTest, MemberExpr_DoesNotMatchClasses) { … }
TEST_P(ASTMatchersTest, MemberExpr_MatchesMemberFunctionCall) { … }
TEST_P(ASTMatchersTest, MemberExpr_MatchesVariable) { … }
TEST_P(ASTMatchersTest, MemberExpr_MatchesStaticVariable) { … }
TEST_P(ASTMatchersTest, FunctionDecl) { … }
TEST_P(ASTMatchersTest, FunctionDecl_C) { … }
TEST_P(ASTMatchersTest, FunctionDecl_CXX) { … }
TEST_P(ASTMatchersTest, FunctionDecl_CXX11) { … }
TEST_P(ASTMatchersTest,
FunctionTemplateDecl_MatchesFunctionTemplateDeclarations) { … }
TEST_P(ASTMatchersTest, FunctionTemplate_DoesNotMatchFunctionDeclarations) { … }
TEST_P(ASTMatchersTest,
FunctionTemplateDecl_DoesNotMatchFunctionTemplateSpecializations) { … }
TEST_P(ASTMatchersTest, ClassTemplateSpecializationDecl) { … }
TEST_P(ASTMatchersTest, DeclaratorDecl) { … }
TEST_P(ASTMatchersTest, DeclaratorDecl_CXX) { … }
TEST_P(ASTMatchersTest, ParmVarDecl) { … }
TEST_P(ASTMatchersTest, StaticAssertDecl) { … }
TEST_P(ASTMatchersTest, Matcher_ConstructorCall) { … }
TEST_P(ASTMatchersTest, Match_ConstructorInitializers) { … }
TEST_P(ASTMatchersTest, Matcher_ThisExpr) { … }
TEST_P(ASTMatchersTest, Matcher_BindTemporaryExpression) { … }
TEST_P(ASTMatchersTest, MaterializeTemporaryExpr_MatchesTemporaryCXX11CXX14) { … }
TEST_P(ASTMatchersTest, MaterializeTemporaryExpr_MatchesTemporary) { … }
TEST_P(ASTMatchersTest, Matcher_NewExpression) { … }
TEST_P(ASTMatchersTest, Matcher_DeleteExpression) { … }
TEST_P(ASTMatchersTest, Matcher_NoexceptExpression) { … }
TEST_P(ASTMatchersTest, Matcher_DefaultArgument) { … }
TEST_P(ASTMatchersTest, StringLiteral) { … }
TEST_P(ASTMatchersTest, StringLiteral_CXX) { … }
TEST_P(ASTMatchersTest, CharacterLiteral) { … }
TEST_P(ASTMatchersTest, CharacterLiteral_CXX) { … }
TEST_P(ASTMatchersTest, IntegerLiteral) { … }
TEST_P(ASTMatchersTest, FloatLiteral) { … }
TEST_P(ASTMatchersTest, CXXNullPtrLiteralExpr) { … }
TEST_P(ASTMatchersTest, ChooseExpr) { … }
TEST_P(ASTMatchersTest, ConvertVectorExpr) { … }
TEST_P(ASTMatchersTest, GNUNullExpr) { … }
TEST_P(ASTMatchersTest, GenericSelectionExpr) { … }
TEST_P(ASTMatchersTest, AtomicExpr) { … }
TEST_P(ASTMatchersTest, Initializers_C99) { … }
TEST_P(ASTMatchersTest, Initializers_CXX) { … }
TEST_P(ASTMatchersTest, ParenListExpr) { … }
TEST_P(ASTMatchersTest, StmtExpr) { … }
TEST_P(ASTMatchersTest, PredefinedExpr) { … }
TEST_P(ASTMatchersTest, AsmStatement) { … }
TEST_P(ASTMatchersTest, HasCondition) { … }
TEST_P(ASTMatchersTest, ConditionalOperator) { … }
TEST_P(ASTMatchersTest, BinaryConditionalOperator) { … }
TEST_P(ASTMatchersTest, ArraySubscriptExpr) { … }
TEST_P(ASTMatchersTest, ForStmt) { … }
TEST_P(ASTMatchersTest, ForStmt_CXX11) { … }
TEST_P(ASTMatchersTest, ForStmt_NoFalsePositives) { … }
TEST_P(ASTMatchersTest, CompoundStatement) { … }
TEST_P(ASTMatchersTest, CompoundStatement_DoesNotMatchEmptyStruct) { … }
TEST_P(ASTMatchersTest, CastExpr_MatchesExplicitCasts) { … }
TEST_P(ASTMatchersTest, CastExpr_MatchesExplicitCasts_CXX) { … }
TEST_P(ASTMatchersTest, CastExpression_MatchesImplicitCasts) { … }
TEST_P(ASTMatchersTest, CastExpr_DoesNotMatchNonCasts) { … }
TEST_P(ASTMatchersTest, CastExpr_DoesNotMatchNonCasts_CXX) { … }
TEST_P(ASTMatchersTest, CXXReinterpretCastExpr) { … }
TEST_P(ASTMatchersTest, CXXReinterpretCastExpr_DoesNotMatchOtherCasts) { … }
TEST_P(ASTMatchersTest, CXXFunctionalCastExpr_MatchesSimpleCase) { … }
TEST_P(ASTMatchersTest, CXXFunctionalCastExpr_DoesNotMatchOtherCasts) { … }
TEST_P(ASTMatchersTest, CXXDynamicCastExpr) { … }
TEST_P(ASTMatchersTest, CXXStaticCastExpr_MatchesSimpleCase) { … }
TEST_P(ASTMatchersTest, CXXStaticCastExpr_DoesNotMatchOtherCasts) { … }
TEST_P(ASTMatchersTest, CStyleCastExpr_MatchesSimpleCase) { … }
TEST_P(ASTMatchersTest, CStyleCastExpr_DoesNotMatchOtherCasts) { … }
TEST_P(ASTMatchersTest, ImplicitCastExpr_MatchesSimpleCase) { … }
TEST_P(ASTMatchersTest, ImplicitCastExpr_DoesNotMatchIncorrectly) { … }
TEST_P(ASTMatchersTest, ImplicitCastExpr_DoesNotMatchIncorrectly_CXX) { … }
TEST_P(ASTMatchersTest, Stmt_DoesNotMatchDeclarations) { … }
TEST_P(ASTMatchersTest, Stmt_MatchesCompoundStatments) { … }
TEST_P(ASTMatchersTest, DeclStmt_DoesNotMatchCompoundStatements) { … }
TEST_P(ASTMatchersTest, DeclStmt_MatchesVariableDeclarationStatements) { … }
TEST_P(ASTMatchersTest, ExprWithCleanups_MatchesExprWithCleanups) { … }
TEST_P(ASTMatchersTest, InitListExpr) { … }
TEST_P(ASTMatchersTest, InitListExpr_CXX) { … }
TEST_P(ASTMatchersTest,
CXXStdInitializerListExpression_MatchesCXXStdInitializerListExpression) { … }
TEST_P(ASTMatchersTest, UsingDecl_MatchesUsingDeclarations) { … }
TEST_P(ASTMatchersTest, UsingDecl_MatchesShadowUsingDelcarations) { … }
TEST_P(ASTMatchersTest, UsingEnumDecl_MatchesUsingEnumDeclarations) { … }
TEST_P(ASTMatchersTest, UsingEnumDecl_MatchesShadowUsingDeclarations) { … }
TEST_P(ASTMatchersTest, UsingDirectiveDecl_MatchesUsingNamespace) { … }
TEST_P(ASTMatchersTest, WhileStmt) { … }
TEST_P(ASTMatchersTest, DoStmt_MatchesDoLoops) { … }
TEST_P(ASTMatchersTest, DoStmt_DoesNotMatchWhileLoops) { … }
TEST_P(ASTMatchersTest, SwitchCase_MatchesCase) { … }
TEST_P(ASTMatchersTest, SwitchCase_MatchesSwitch) { … }
TEST_P(ASTMatchersTest, CxxExceptionHandling_SimpleCases) { … }
TEST_P(ASTMatchersTest, ParenExpr_SimpleCases) { … }
TEST_P(ASTMatchersTest, IgnoringParens) { … }
TEST_P(ASTMatchersTest, QualType) { … }
TEST_P(ASTMatchersTest, ConstantArrayType) { … }
TEST_P(ASTMatchersTest, DependentSizedArrayType) { … }
TEST_P(ASTMatchersTest, DependentSizedExtVectorType) { … }
TEST_P(ASTMatchersTest, IncompleteArrayType) { … }
TEST_P(ASTMatchersTest, VariableArrayType) { … }
TEST_P(ASTMatchersTest, AtomicType) { … }
TEST_P(ASTMatchersTest, AutoType) { … }
TEST_P(ASTMatchersTest, DecltypeType) { … }
TEST_P(ASTMatchersTest, FunctionType) { … }
TEST_P(ASTMatchersTest, IgnoringParens_Type) { … }
TEST_P(ASTMatchersTest, FunctionProtoType) { … }
TEST_P(ASTMatchersTest, FunctionProtoType_C) { … }
TEST_P(ASTMatchersTest, FunctionProtoType_CXX) { … }
TEST_P(ASTMatchersTest, ParenType) { … }
TEST_P(ASTMatchersTest, PointerType) { … }
TEST_P(ASTMatchersTest, PointerType_CXX) { … }
TEST_P(ASTMatchersTest, PointerType_CXX11) { … }
TEST_P(ASTMatchersTest, AutoRefTypes) { … }
TEST_P(ASTMatchersTest, EnumType) { … }
TEST_P(ASTMatchersTest, EnumType_CXX) { … }
TEST_P(ASTMatchersTest, EnumType_CXX11) { … }
TEST_P(ASTMatchersTest, PointerType_MatchesPointersToConstTypes) { … }
TEST_P(ASTMatchersTest, TypedefType) { … }
TEST_P(ASTMatchersTest, MacroQualifiedType) { … }
TEST_P(ASTMatchersTest, TemplateSpecializationType) { … }
TEST_P(ASTMatchersTest, DeducedTemplateSpecializationType) { … }
TEST_P(ASTMatchersTest, RecordType) { … }
TEST_P(ASTMatchersTest, RecordType_CXX) { … }
TEST_P(ASTMatchersTest, ElaboratedType) { … }
TEST_P(ASTMatchersTest, SubstTemplateTypeParmType) { … }
TEST_P(ASTMatchersTest, NestedNameSpecifier) { … }
TEST_P(ASTMatchersTest, Attr) { … }
TEST_P(ASTMatchersTest, NullStmt) { … }
TEST_P(ASTMatchersTest, NamespaceAliasDecl) { … }
TEST_P(ASTMatchersTest, NestedNameSpecifier_MatchesTypes) { … }
TEST_P(ASTMatchersTest, NestedNameSpecifier_MatchesNamespaceDecls) { … }
TEST_P(ASTMatchersTest,
NestedNameSpecifier_MatchesNestedNameSpecifierPrefixes) { … }
template <typename T>
class VerifyAncestorHasChildIsEqual : public BoundNodesCallback { … };
TEST_P(ASTMatchersTest, IsEqualTo_MatchesNodesByIdentity) { … }
TEST_P(ASTMatchersTest, IsEqualTo_MatchesNodesByIdentity_Cxx) { … }
TEST_P(ASTMatchersTest, TypedefDecl) { … }
TEST_P(ASTMatchersTest, TypedefDecl_Cxx) { … }
TEST_P(ASTMatchersTest, TypeAliasDecl) { … }
TEST_P(ASTMatchersTest, TypeAliasDecl_CXX) { … }
TEST_P(ASTMatchersTest, TypedefNameDecl) { … }
TEST_P(ASTMatchersTest, TypedefNameDecl_CXX) { … }
TEST_P(ASTMatchersTest, TypeAliasTemplateDecl) { … }
TEST_P(ASTMatchersTest, QualifiedTypeLocTest_BindsToConstIntVarDecl) { … }
TEST_P(ASTMatchersTest, QualifiedTypeLocTest_BindsToConstIntFunctionDecl) { … }
TEST_P(ASTMatchersTest, QualifiedTypeLocTest_DoesNotBindToUnqualifiedVarDecl) { … }
TEST_P(ASTMatchersTest, QualifiedTypeLocTest_IntDoesNotBindToConstIntDecl) { … }
TEST_P(ASTMatchersTest, QualifiedTypeLocTest_IntDoesNotBindToConstFloatDecl) { … }
TEST_P(ASTMatchersTest, PointerTypeLocTest_BindsToAnyPointerTypeLoc) { … }
TEST_P(ASTMatchersTest, PointerTypeLocTest_DoesNotBindToNonPointerTypeLoc) { … }
TEST_P(ASTMatchersTest, ReferenceTypeLocTest_BindsToAnyReferenceTypeLoc) { … }
TEST_P(ASTMatchersTest, ReferenceTypeLocTest_DoesNotBindToNonReferenceTypeLoc) { … }
TEST_P(ASTMatchersTest, ReferenceTypeLocTest_BindsToAnyRvalueReferenceTypeLoc) { … }
TEST_P(ASTMatchersTest,
TemplateSpecializationTypeLocTest_BindsToVarDeclTemplateSpecialization) { … }
TEST_P(
ASTMatchersTest,
TemplateSpecializationTypeLocTest_DoesNotBindToNonTemplateSpecialization) { … }
TEST_P(ASTMatchersTest,
ElaboratedTypeLocTest_BindsToElaboratedObjectDeclaration) { … }
TEST_P(ASTMatchersTest,
ElaboratedTypeLocTest_BindsToNamespaceElaboratedObjectDeclaration) { … }
TEST_P(ASTMatchersTest,
ElaboratedTypeLocTest_BindsToElaboratedStructDeclaration) { … }
TEST_P(ASTMatchersTest,
ElaboratedTypeLocTest_BindsToBareElaboratedObjectDeclaration) { … }
TEST_P(
ASTMatchersTest,
ElaboratedTypeLocTest_DoesNotBindToNamespaceNonElaboratedObjectDeclaration) { … }
TEST_P(ASTMatchersTest,
ElaboratedTypeLocTest_BindsToBareElaboratedStructDeclaration) { … }
TEST_P(ASTMatchersTest, LambdaCaptureTest) { … }
TEST_P(ASTMatchersTest, LambdaCaptureTest_BindsToCaptureOfVarDecl) { … }
TEST_P(ASTMatchersTest, LambdaCaptureTest_BindsToCaptureWithInitializer) { … }
TEST_P(ASTMatchersTest, LambdaCaptureTest_DoesNotBindToCaptureOfVarDecl) { … }
TEST_P(ASTMatchersTest,
LambdaCaptureTest_DoesNotBindToCaptureWithInitializerAndDifferentName) { … }
TEST_P(ASTMatchersTest, LambdaCaptureTest_BindsToCaptureOfReferenceType) { … }
TEST_P(ASTMatchersTest, IsDerivedFromRecursion) { … }
TEST(ASTMatchersTestObjC, ObjCMessageCalees) { … }
TEST(ASTMatchersTestObjC, ObjCMessageExpr) { … }
TEST(ASTMatchersTestObjC, ObjCStringLiteral) { … }
TEST(ASTMatchersTestObjC, ObjCDecls) { … }
TEST(ASTMatchersTestObjC, ObjCExceptionStmts) { … }
TEST(ASTMatchersTest, DecompositionDecl) { … }
TEST(ASTMatchersTestObjC, ObjCAutoreleasePoolStmt) { … }
TEST(ASTMatchersTestOpenMP, OMPExecutableDirective) { … }
TEST(ASTMatchersTestOpenMP, OMPDefaultClause) { … }
TEST(ASTMatchersTest, Finder_DynamicOnlyAcceptsSomeMatchers) { … }
TEST(MatchFinderAPI, MatchesDynamic) { … }
static std::vector<TestClangConfig> allTestClangConfigs() { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}