Home
last modified time | relevance | path

Searched refs:varDecl (Results 1 – 25 of 126) sorted by relevance

123456

/external/clang/unittests/ASTMatchers/
DASTMatchersNodeTest.cpp104 Code, varDecl(hasName("MyVar1"), hasDeclContext(translationUnitDecl())))); in TEST()
106 Code, varDecl(hasName("MyVar2"), hasDeclContext(translationUnitDecl())))); in TEST()
109 varDecl(hasName("MyVar2"), in TEST()
358 varDecl(hasInitializer( in TEST()
383 cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y")))))); in TEST()
753 varDecl(hasInitializer(parenListExpr(has(unaryOperator())))))); in TEST()
758 varDecl(hasInitializer(stmtExpr())))); in TEST()
952 varDecl(hasInitializer(implicitCastExpr())))); in TEST()
955 varDecl(hasInitializer(implicitCastExpr())))); in TEST()
958 varDecl(hasInitializer(implicitCastExpr())))); in TEST()
[all …]
DASTMatchersNarrowingTest.cpp30 hasArgument(0, declRefExpr(to(varDecl()))))))); in TEST()
33 hasArgument(0, declRefExpr(to(varDecl()))), in TEST()
38 hasArgument(0, declRefExpr(to(varDecl()))), in TEST()
44 hasArgument(0, declRefExpr(to(varDecl()))), in TEST()
323 cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll())))); in TEST()
486 varDecl(hasName("z_float"), in TEST()
490 varDecl(hasName("z_float"), in TEST()
494 varDecl(hasName("z_char"), in TEST()
511 varDecl(hasName("z_float"), in TEST()
515 varDecl(hasName("z_float"), in TEST()
[all …]
DASTMatchersTraversalTest.cpp83 varDecl(hasDescendant(isInteger())).bind("x"))), in TEST()
105 varDecl(hasName("i"), has(isInteger())))); in TEST()
107 varDecl(hasName("i"), has(isInteger())))); in TEST()
117 varDecl(hasName("i"), hasType(qualType(has(builtinType())))))); in TEST()
120 varDecl(hasName("i"), hasType(qualType(has(pointerType())))))); in TEST()
126 has(ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("i"))))))); in TEST()
137 hasDescendant(declRefExpr(to(varDecl(hasName("i")))))); in TEST()
167 varDecl(hasType(namedDecl(hasName("S")))))); in TEST()
232 varDecl(hasName("a"), in TEST()
240 varDecl(hasType(templateSpecializationType( in TEST()
[all …]
/external/llvm-project/clang/unittests/ASTMatchers/
DASTMatchersTraversalTest.cpp82 varDecl(hasDescendant(isInteger())).bind("x"))), in TEST()
104 varDecl(hasName("i"), has(isInteger())))); in TEST()
106 varDecl(hasName("i"), has(isInteger())))); in TEST()
116 varDecl(hasName("i"), hasType(qualType(has(builtinType())))))); in TEST()
119 varDecl(hasName("i"), hasType(qualType(has(pointerType())))))); in TEST()
125 has(ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("i"))))))); in TEST()
136 hasDescendant(declRefExpr(to(varDecl(hasName("i")))))); in TEST()
166 varDecl(hasType(namedDecl(hasName("S")))))); in TEST()
245 varDecl(hasName("a"), in TEST()
253 varDecl(hasType(templateSpecializationType( in TEST()
[all …]
DASTMatchersNodeTest.cpp121 Code, varDecl(hasName("MyVar1"), hasDeclContext(translationUnitDecl())))); in TEST_P()
123 Code, varDecl(hasName("MyVar2"), hasDeclContext(translationUnitDecl())))); in TEST_P()
126 varDecl(hasName("MyVar2"), in TEST_P()
509 StatementMatcher Reference = declRefExpr(to(varDecl(hasInitializer( in TEST_P()
537 cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y")))))); in TEST_P()
1039 varDecl(hasInitializer(parenListExpr(has(unaryOperator())))))); in TEST_P()
1044 varDecl(hasInitializer(stmtExpr())))); in TEST_P()
1304 varDecl(hasInitializer(implicitCastExpr()))))); in TEST_P()
1308 varDecl(hasInitializer(implicitCastExpr()))))); in TEST_P()
1312 varDecl(hasInitializer(implicitCastExpr()))))); in TEST_P()
[all …]
DASTMatchersNarrowingTest.cpp150 EXPECT_TRUE(matches(input, varDecl(isExpandedFromMacro("MY_MACRO")))); in TEST()
167 hasArgument(0, declRefExpr(to(varDecl()))))))); in TEST_P()
172 hasArgument(0, declRefExpr(to(varDecl()))), in TEST_P()
177 hasArgument(0, declRefExpr(to(varDecl()))), in TEST_P()
183 hasArgument(0, declRefExpr(to(varDecl()))), in TEST_P()
318 varDecl(has(castExpr(hasCastKind(CK_NullToPointer))))))); in TEST_P()
322 varDecl(has(castExpr(hasCastKind(CK_DerivedToBase))))))); in TEST_P()
326 varDecl(has(implicitCastExpr(hasCastKind(CK_NullToPointer))))))); in TEST_P()
466 cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll())))); in TEST_P()
668 varDecl(hasName("z_float"), in TEST_P()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/misc/
DThrowByValueCatchByReferenceCheck.cpp57 if (auto *varDecl = dyn_cast<VarDecl>(valueDecl)) in isCatchVariable() local
58 return varDecl->isExceptionVariable(); in isCatchVariable()
141 auto *varDecl = catchStmt->getExceptionDecl(); in diagnoseCatchLocations() local
149 diag(varDecl->getBeginLoc(), diagMsgCatchReference); in diagnoseCatchLocations()
157 diag(varDecl->getBeginLoc(), diagMsgCatchReference); in diagnoseCatchLocations()
167 diag(varDecl->getBeginLoc(), diagMsgCatchReference); in diagnoseCatchLocations()
/external/llvm-project/clang/lib/StaticAnalyzer/Core/
DLoopUnrolling.cpp87 to(varDecl(hasType(isInteger())).bind(BindName))))), in simpleCondition()
98 declRefExpr(to(varDecl(VarNodeMatcher)))))), in changeIntBoundNode()
101 declRefExpr(to(varDecl(VarNodeMatcher))))))); in changeIntBoundNode()
107 declRefExpr(to(varDecl(VarNodeMatcher))), in callByRef()
113 return declStmt(hasDescendant(varDecl( in assignedToRef()
116 initListExpr(has(declRefExpr(to(varDecl(VarNodeMatcher))))), in assignedToRef()
117 declRefExpr(to(varDecl(VarNodeMatcher))))))))); in assignedToRef()
145 varDecl(allOf(hasInitializer(ignoringParenImpCasts( in forLoopMatcher()
148 binaryOperator(hasLHS(declRefExpr(to(varDecl( in forLoopMatcher()
157 to(varDecl(allOf(equalsBoundNode("initVarName"), in forLoopMatcher()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DSpuriouslyWakeUpFunctionsCheck.cpp22 hasDeclaration(varDecl(hasType(recordDecl(classTemplateSpecializationDecl( in registerMatchers()
35 declRefExpr(to(varDecl(hasType(references(recordDecl( in registerMatchers()
42 declRefExpr(to(varDecl(hasType(references(recordDecl( in registerMatchers()
49 declRefExpr(to(varDecl(hasType(references(recordDecl( in registerMatchers()
/external/llvm-project/mlir/examples/toy/Ch6/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
91 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
93 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
94 dump(varDecl->getType()); in dump()
95 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
96 dump(varDecl->getInitVal()); in dump()
/external/llvm-project/mlir/examples/toy/Ch3/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
91 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
93 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
94 dump(varDecl->getType()); in dump()
95 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
96 dump(varDecl->getInitVal()); in dump()
/external/llvm-project/mlir/examples/toy/Ch4/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
91 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
93 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
94 dump(varDecl->getType()); in dump()
95 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
96 dump(varDecl->getInitVal()); in dump()
/external/llvm-project/mlir/examples/toy/Ch1/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
91 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
93 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
94 dump(varDecl->getType()); in dump()
95 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
96 dump(varDecl->getInitVal()); in dump()
/external/llvm-project/mlir/examples/toy/Ch5/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
91 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
93 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
94 dump(varDecl->getType()); in dump()
95 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
96 dump(varDecl->getInitVal()); in dump()
/external/llvm-project/mlir/examples/toy/Ch2/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
91 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
93 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
94 dump(varDecl->getType()); in dump()
95 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
96 dump(varDecl->getInitVal()); in dump()
/external/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/
DInterfacesGlobalInitCheck.cpp21 varDecl(hasGlobalStorage(), in registerMatchers()
28 varDecl(GlobalVarDecl, unless(isDefinition())).bind("referencee"))); in registerMatchers()
31 varDecl(GlobalVarDecl, isDefinition(), in registerMatchers()
DAvoidNonConstGlobalVariablesCheck.cpp25 auto GlobalVariable = varDecl( in registerMatchers()
33 varDecl(hasGlobalStorage(), hasType(referenceType()), in registerMatchers()
37 varDecl(hasGlobalStorage(), in registerMatchers()
/external/llvm-project/mlir/examples/toy/Ch7/parser/
DAST.cpp39 void dump(VarDeclExprAST *varDecl);
93 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
95 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
96 dump(varDecl->getType()); in dump()
97 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
98 if (auto *initVal = varDecl->getInitVal()) in dump()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DUseAutoCheck.cpp206 varDecl(anyOf(unless(hasWrittenNonListInitializer()), in makeIteratorDeclMatcher()
215 unless(has(varDecl(anyOf( in makeDeclWithNewMatcher()
233 unless(has(varDecl(unless(hasInitializer(explicitCastExpr())))))) in makeDeclWithCastMatcher()
253 return declStmt(unless(has(varDecl( in makeDeclWithTemplateCastMatcher()
263 has(varDecl(unless(isImplicit()))), in makeCombinedMatcher()
265 unless(has(varDecl(anyOf(hasType(autoType()), in makeCombinedMatcher()
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DGCDAntipatternChecker.cpp61 to(varDecl(equalsBoundNode(DeclName)))))); in equalsBoundArgDecl()
66 declRefExpr(to(varDecl().bind(DeclName))))); in bindAssignmentToDecl()
99 varDecl(hasDescendant(SemaphoreCreateM)).bind(SemaphoreBinding)), in findGCDAntiPatternWithSemaphore()
141 varDecl(hasDescendant(DispatchGroupCreateM)).bind(GroupBinding)), in findGCDAntiPatternWithGroup()
/external/clang/unittests/AST/
DASTImporterTest.cpp229 declRefExpr(hasDeclaration(varDecl(hasName("ptr"))), in TEST()
277 varDecl( in TEST()
300 varDecl( in TEST()
308 varDecl( in TEST()
375 varDecl( in TEST()
438 varDecl( in TEST()
DSourceLocationTest.cpp34 EXPECT_FALSE(Verifier.match("int i", varDecl())); in TEST()
46 EXPECT_FALSE(Verifier.match("int i;", varDecl())); in TEST()
52 EXPECT_FALSE(Verifier.match("int i;", varDecl())); in TEST()
58 EXPECT_FALSE(Verifier.match("int i;", varDecl())); in TEST()
83 EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C)); in TEST()
89 EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C)); in TEST()
148 varDecl(), Lang_C89)); in TEST()
/external/turbine/java/com/google/turbine/tree/
DPretty.java280 public Void visitVarDecl(Tree.VarDecl varDecl, Void input) { in visitVarDecl() argument
281 printVarDecl(varDecl); in visitVarDecl()
286 private void printVarDecl(Tree.VarDecl varDecl) { in printVarDecl() argument
287 printAnnos(varDecl.annos()); in printVarDecl()
288 printModifiers(varDecl.mods()); in printVarDecl()
289 varDecl.ty().accept(this, null); in printVarDecl()
290 append(' ').append(varDecl.name().value()); in printVarDecl()
291 if (varDecl.init().isPresent()) { in printVarDecl()
293 varDecl.init().get().accept(this, null); in printVarDecl()
/external/llvm-project/clang/unittests/Tooling/
DTransformerTest.cpp493 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
519 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
531 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
548 hasParameter(0, varDecl(hasTypeLoc( in TEST_F()
560 auto InlineVar = makeRule(declRefExpr(to(varDecl(equalsBoundNode(VarId)))), in TEST_F()
563 hasParameter(0, varDecl().bind(VarId))) in TEST_F()
573 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
591 hasParameter(0, varDecl(hasType(qualType().bind("type"))))), in TEST_F()
614 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
631 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DDeclRefExprUtils.cpp48 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"); in constReferenceDeclRefExprs()
92 findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")), in allDeclRefExprs()
103 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))), in allDeclRefExprs()

123456