Home
last modified time | relevance | path

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

12345

/llvm-project-15.0.7/clang/unittests/ASTMatchers/
H A DASTMatchersTraversalTest.cpp2512 varDecl( in TEST()
3246 to(varDecl(hasName("arr"))), hasParent(varDecl(hasParent(declStmt( in TEST()
5242 varDecl(hasName("x"), in TEST()
5908 auto matcher = varDecl( in TEST()
6030 auto matcher = varDecl( in TEST()
6040 auto matcher = varDecl( in TEST()
6051 auto matcher = varDecl( in TEST()
6175 varDecl(hasName("a"), in TEST()
6183 varDecl(hasName("a"), in TEST()
6316 varDecl(hasName("c"), in TEST()
[all …]
H A DASTMatchersNarrowingTest.cpp1108 varDecl(hasName("z_float"), in TEST_P()
1112 varDecl(hasName("z_float"), in TEST_P()
1116 varDecl(hasName("z_char"), in TEST_P()
1133 varDecl(hasName("z_float"), in TEST_P()
1137 varDecl(hasName("z_float"), in TEST_P()
1141 varDecl(hasName("z_char"), in TEST_P()
1421 auto M = varDecl(hasName("X"), hasLocalStorage()); in TEST_P()
1435 auto M = varDecl(isStaticLocal()); in TEST_P()
1446 auto M = varDecl(hasName("vd"), isInitCapture()); in TEST_P()
2532 EXPECT_TRUE(matches(code, varDecl(hasName("i")))); in TEST_P()
[all …]
H A DASTMatchersNodeTest.cpp126 varDecl(hasName("MyVar2"), in TEST_P()
508 StatementMatcher Reference = declRefExpr(to(varDecl(hasInitializer( in TEST_P()
536 cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y")))))); in TEST_P()
1057 varDecl(hasInitializer(stmtExpr())))); in TEST_P()
1514 varDecl(isExceptionVariable()))); in TEST_P()
1516 varDecl(isExceptionVariable()))); in TEST_P()
1601 EXPECT_TRUE(matches("auto i = 2;", varDecl(hasType(isInteger())))); in TEST_P()
1603 varDecl(hasType(recordDecl(hasName("X")))))); in TEST_P()
2117 auto matcher = varDecl(hasName("x"), hasTypeLoc(pointerTypeLoc())); in TEST_P()
2125 auto matcher = varDecl(hasName("x"), hasTypeLoc(pointerTypeLoc())); in TEST_P()
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DLoopUnrolling.cpp89 declRefExpr(to(varDecl(hasType(isInteger())).bind(BindName))) in simpleCondition()
101 declRefExpr(to(varDecl(VarNodeMatcher)))))), in changeIntBoundNode()
104 declRefExpr(to(varDecl(VarNodeMatcher))))))); in changeIntBoundNode()
110 declRefExpr(to(varDecl(VarNodeMatcher))), in callByRef()
116 return declStmt(hasDescendant(varDecl( in assignedToRef()
119 initListExpr(has(declRefExpr(to(varDecl(VarNodeMatcher))))), in assignedToRef()
120 declRefExpr(to(varDecl(VarNodeMatcher))))))))); in assignedToRef()
148 varDecl(allOf(hasInitializer(ignoringParenImpCasts( in forLoopMatcher()
151 binaryOperator(hasLHS(declRefExpr(to(varDecl( in forLoopMatcher()
160 to(varDecl(allOf(equalsBoundNode("initVarName"), in forLoopMatcher()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A 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()
H A DStringviewNullptrCheck.cpp114 varDecl(HasBasicStringViewType, in StringviewNullptrCheckImpl()
123 makeRule(varDecl(HasBasicStringViewType, in StringviewNullptrCheckImpl()
132 makeRule(varDecl(HasBasicStringViewType, in StringviewNullptrCheckImpl()
143 makeRule(varDecl(HasBasicStringViewType, in StringviewNullptrCheckImpl()
/llvm-project-15.0.7/mlir/examples/toy/Ch3/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
92 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
94 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
95 dump(varDecl->getType()); in dump()
96 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
97 dump(varDecl->getInitVal()); in dump()
/llvm-project-15.0.7/mlir/examples/toy/Ch1/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
92 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
94 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
95 dump(varDecl->getType()); in dump()
96 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
97 dump(varDecl->getInitVal()); in dump()
/llvm-project-15.0.7/mlir/examples/toy/Ch2/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
92 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
94 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
95 dump(varDecl->getType()); in dump()
96 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
97 dump(varDecl->getInitVal()); in dump()
/llvm-project-15.0.7/mlir/examples/toy/Ch6/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
92 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
94 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
95 dump(varDecl->getType()); in dump()
96 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
97 dump(varDecl->getInitVal()); in dump()
/llvm-project-15.0.7/mlir/examples/toy/Ch4/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
92 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
94 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
95 dump(varDecl->getType()); in dump()
96 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
97 dump(varDecl->getInitVal()); in dump()
/llvm-project-15.0.7/mlir/examples/toy/Ch5/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
92 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
94 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
95 dump(varDecl->getType()); in dump()
96 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
97 dump(varDecl->getInitVal()); in dump()
/llvm-project-15.0.7/mlir/lib/Tools/PDLL/CodeGen/
H A DMLIRGen.cpp78 SmallVector<Value> genVar(const ast::VariableDecl *varDecl);
292 auto it = variables.begin(varDecl); in genVar()
299 if (const ast::Expr *initExpr = varDecl->getInitExpr()) in genVar()
302 values.push_back(genNonInitializerVar(varDecl, genLoc(varDecl->getLoc()))); in genVar()
305 applyVarConstraints(varDecl, values); in genVar()
307 variables.insert(varDecl, values); in genVar()
311 Value CodeGen::genNonInitializerVar(const ast::VariableDecl *varDecl, in genNonInitializerVar() argument
333 ast::Type type = varDecl->getType(); in genNonInitializerVar()
364 void CodeGen::applyVarConstraints(const ast::VariableDecl *varDecl, in applyVarConstraints() argument
368 for (const ast::ConstraintRef &ref : varDecl->getConstraints()) in applyVarConstraints()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DInterfacesGlobalInitCheck.cpp21 varDecl(hasGlobalStorage(), in registerMatchers()
28 varDecl(GlobalVarDecl, unless(isDefinition())).bind("referencee"))); in registerMatchers()
31 traverse(TK_AsIs, varDecl(GlobalVarDecl, isDefinition(), in registerMatchers()
H A DAvoidNonConstGlobalVariablesCheck.cpp25 auto GlobalVariable = varDecl( in registerMatchers()
33 varDecl(hasGlobalStorage(), hasType(referenceType()), in registerMatchers()
37 varDecl(hasGlobalStorage(), in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DDeclRefExprUtils.cpp48 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"); in constReferenceDeclRefExprs()
74 has(varDecl(hasType(qualType(matchers::isReferenceToConst())), in constReferenceDeclRefExprs()
79 match(findAll(declStmt(has(varDecl( in constReferenceDeclRefExprs()
103 findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")), in allDeclRefExprs()
114 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))), in allDeclRefExprs()
/llvm-project-15.0.7/mlir/examples/toy/Ch7/parser/
H A DAST.cpp39 void dump(VarDeclExprAST *varDecl);
94 void ASTDumper::dump(VarDeclExprAST *varDecl) { in dump() argument
96 llvm::errs() << "VarDecl " << varDecl->getName(); in dump()
97 dump(varDecl->getType()); in dump()
98 llvm::errs() << " " << loc(varDecl) << "\n"; in dump()
99 if (auto *initVal = varDecl->getInitVal()) in dump()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/
H A DIdDependentBackwardBranchCheck.cpp26 stmt(anyOf(declRefExpr(to(varDecl())).bind("assign_ref_var"), in registerMatchers()
34 anyOf(declStmt(hasDescendant(varDecl(hasInitializer(ThreadID)) in registerMatchers()
39 declRefExpr(to(varDecl().bind("tid_dep_var"))), in registerMatchers()
49 varDecl(hasInitializer(RefVarOrField)).bind("pot_tid_var"))), in registerMatchers()
58 declRefExpr(to(varDecl().bind("pot_tid_var"))), in registerMatchers()
71 hasDescendant(stmt(anyOf(declRefExpr(to(varDecl())), in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A 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()
H A DLoopConvertCheck.cpp73 declRefExpr(to(varDecl(equalsBoundNode(InitVarName)))))); in integerComparisonMatcher()
77 return varDecl( in initToZeroMatcher()
83 return declRefExpr(to(varDecl(equalsBoundNode(InitVarName)))); in incrementVarMatcher()
158 varDecl(hasInitializer(anyOf(ignoringParenImpCasts(BeginCallMatcher), in makeIteratorLoopMatcher()
165 varDecl(hasInitializer(anything())).bind(EndVarName); in makeIteratorLoopMatcher()
172 declRefExpr(to(varDecl(equalsBoundNode(EndVarName))))), in makeIteratorLoopMatcher()
178 declRefExpr(to(varDecl(equalsBoundNode(InitVarName)))))); in makeIteratorLoopMatcher()
209 to(varDecl(equalsBoundNode(InitVarName)))))), in makeIteratorLoopMatcher()
213 varDecl(equalsBoundNode(InitVarName), in makeIteratorLoopMatcher()
279 varDecl(hasInitializer(EndInitMatcher)).bind(EndVarName); in makePseudoArrayLoopMatcher()
[all …]
/llvm-project-15.0.7/clang/unittests/AST/
H A DDeclTest.cpp129 selectFirst<VarDecl>("A", match(varDecl().bind("A"), Ctx)); in TEST()
231 selectFirst<VarDecl>("a", match(varDecl(hasName("a")).bind("a"), Ctx)); in TEST()
239 selectFirst<VarDecl>("b", match(varDecl(hasName("b")).bind("b"), Ctx)); in TEST()
249 a = selectFirst<VarDecl>("a", match(varDecl(hasName("a")).bind("a"), CtxTS)); in TEST()
256 b = selectFirst<VarDecl>("b", match(varDecl(hasName("b")).bind("b"), CtxTS)); in TEST()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A 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()
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DTransformerTest.cpp531 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
557 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
569 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
586 hasParameter(0, varDecl(hasTypeLoc( in TEST_F()
601 hasParameter(0, varDecl().bind(VarId))) in TEST_F()
611 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
652 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
797 declStmt(containsDeclaration(0, varDecl(hasInitializer( in TEST_F()
1274 to(varDecl(equalsBoundNode("loopVar")))))), in TEST_F()
1278 to(varDecl(equalsBoundNode("loopVar")))))) in TEST_F()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DIdentifierLengthCheck.cpp75 forStmt(hasLoopInit(declStmt(forEach(varDecl().bind("loopVar"))))), in registerMatchers()
79 Finder->addMatcher(varDecl(hasParent(cxxCatchStmt())).bind("exceptionVar"), in registerMatchers()
87 varDecl(unless(anyOf(hasParent(declStmt(hasParent(forStmt()))), in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/unittests/clang-tidy/
H A DClangTidyDiagnosticConsumerTest.cpp17 Finder->addMatcher(ast_matchers::varDecl().bind("var"), this); in registerMatchers()
32 Finder->addMatcher(ast_matchers::varDecl().bind("var"), this); in registerMatchers()
45 Finder->addMatcher(ast_matchers::varDecl().bind("var"), this); in registerMatchers()

12345