Home
last modified time | relevance | path

Searched refs:VarDecl (Results 1 – 25 of 437) sorted by relevance

12345678910>>...18

/llvm-project-15.0.7/clang/test/SemaOpenCLCXX/
H A Daddrspace-auto.clcpp4 //CHECK: |-VarDecl {{.*}} ai '__global int':'__global int'
9 //CHECK: VarDecl {{.*}} ai '__private int':'__private int'
13 //CHECK: VarDecl {{.*}} used cai '__constant int':'__constant int'
15 //CHECK: VarDecl {{.*}} aii '__private int':'__private int'
18 //CHECK: VarDecl {{.*}} ref '__private int &__private'
20 //CHECK: VarDecl {{.*}} ptr '__private int *__private'
22 //CHECK: VarDecl {{.*}} ref_c '__constant int &__private'
25 //CHECK: VarDecl {{.*}} ptrptr '__private int *__generic *__private'
27 //CHECK: VarDecl {{.*}} refptr '__private int *__generic &__private'
30 //CHECK: VarDecl {{.*}} invalid gref '__global auto &__private'
[all …]
/llvm-project-15.0.7/clang/lib/ARCMigrate/
H A DTransBlockObjCVariable.cpp41 llvm::DenseSet<VarDecl *> &VarsToChange;
44 VarDecl *Var;
48 BlockVarChecker(VarDecl *var) : Var(var) { } in BlockVarChecker()
78 SmallVector<VarDecl *, 4> BlockVars; in VisitBlockDecl()
81 VarDecl *var = I.getVariable(); in VisitBlockDecl()
90 VarDecl *var = BlockVars[i]; in VisitBlockDecl()
112 llvm::DenseSet<VarDecl *> &VarsToChange;
115 BlockObjCVarRewriter(llvm::DenseSet<VarDecl *> &VarsToChange) in BlockObjCVarRewriter()
128 llvm::DenseSet<VarDecl *> VarsToChange; in traverseBody()
133 for (llvm::DenseSet<VarDecl *>::iterator in traverseBody()
[all …]
H A DTransARCAssign.cpp36 llvm::DenseSet<VarDecl *> ModifiedVars;
49 if (declRef && isa<VarDecl>(declRef->getDecl())) { in VisitBinaryOperator()
54 VarDecl *var = cast<VarDecl>(declRef->getDecl()); in VisitBinaryOperator()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DDeclRefExprUtils.h27 bool isOnlyUsedAsConst(const VarDecl &Var, const Stmt &Stmt,
32 allDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context);
36 allDeclRefExprs(const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context);
41 constReferenceDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt,
H A DDeclRefExprUtils.cpp45 constReferenceDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, in constReferenceDeclRefExprs() argument
48 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"); in constReferenceDeclRefExprs()
88 bool isOnlyUsedAsConst(const VarDecl &Var, const Stmt &Stmt, in isOnlyUsedAsConst()
101 allDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context) { in allDeclRefExprs() argument
103 findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")), in allDeclRefExprs()
111 allDeclRefExprs(const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context) { in allDeclRefExprs() argument
114 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))), in allDeclRefExprs()
H A DAliasing.cpp19 static bool isAccessForVar(const Stmt *S, const VarDecl *Var) { in isAccessForVar()
26 static bool capturesByRef(const CXXRecordDecl *RD, const VarDecl *Var) { in capturesByRef()
34 static bool isPtrOrReferenceForVar(const Stmt *S, const VarDecl *Var) { in isPtrOrReferenceForVar()
41 if (const auto *LeftVar = dyn_cast<VarDecl>(D)) { in isPtrOrReferenceForVar()
66 static bool hasPtrOrReferenceInStmt(const Stmt *S, const VarDecl *Var) { in hasPtrOrReferenceInStmt()
82 const VarDecl *Var) { in refersToEnclosingLambdaCaptureByRef()
94 bool hasPtrOrReferenceInFunc(const Decl *Func, const VarDecl *Var) { in hasPtrOrReferenceInFunc()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DDeadStoresChecker.cpp38 llvm::DenseSet<const VarDecl *> &S;
57 if (const VarDecl *D = dyn_cast<VarDecl>(DR->getDecl())) in VisitDeclRefExpr()
137 llvm::SmallPtrSet<const VarDecl*, 20> Escaped;
192 void Report(const VarDecl *V, DeadStoreKind dsk, in Report()
288 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef()
330 if (VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in observeStmt()
376 const auto *V = dyn_cast<VarDecl>(DI); in observeStmt()
420 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in observeStmt()
481 llvm::SmallPtrSet<const VarDecl*, 20> Escaped;
500 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in operator ()()
[all …]
/llvm-project-15.0.7/clang/lib/Analysis/
H A DUninitializedValues.cpp61 llvm::DenseMap<const VarDecl *, unsigned> map;
83 const VarDecl *vd = *I; in computeMap()
149 const VarDecl *vd) { in getValue()
223 const VarDecl *vd;
230 const VarDecl *getDecl() const { return vd; } in getDecl()
279 bool isTrackedVar(const VarDecl *VD) const { in isTrackedVar()
373 auto *VD = dyn_cast<VarDecl>(DI); in VisitDeclStmt()
496 bool isTrackedVar(const VarDecl *vd) { in isTrackedVar()
711 const VarDecl *vd = I.getVariable(); in VisitBlockExpr()
767 if (const VarDecl *VD = Var.getDecl()) in VisitBinaryOperator()
[all …]
H A DLiveVariables.cpp31 llvm::ImmutableSet<const VarDecl *>::Factory DSetFact;
109 llvm::ImmutableSetRef<const VarDecl *> in merge()
136 static bool isAlwaysAlive(const VarDecl *D) { in isAlwaysAlive()
254 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { in Visit()
327 static bool writeShouldKill(const VarDecl *VD) { in writeShouldKill()
371 for (const VarDecl *VD : in VisitBlockExpr()
418 const VarDecl *VD = nullptr; in VisitObjCForCollectionStmt()
422 VD = cast<VarDecl>(DS->getSingleDecl()); in VisitObjCForCollectionStmt()
425 VD = cast<VarDecl>(DR->getDecl()); in VisitObjCForCollectionStmt()
470 if (isa<VarDecl>(D) || isa<BindingDecl>(D)) { in VisitUnaryOperator()
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DUncountedLocalVarsChecker.cpp33 bool isDeclaredInForOrIf(const VarDecl *Var) { in isDeclaredInForOrIf()
52 bool isRefcountedStringsHack(const VarDecl *V) { in isRefcountedStringsHack()
73 bool isGuardedScopeEmbeddedInGuardianScope(const VarDecl *Guarded, in isGuardedScopeEmbeddedInGuardianScope()
74 const VarDecl *MaybeGuardian) { in isGuardedScopeEmbeddedInGuardianScope()
154 bool VisitVarDecl(VarDecl *V) { in checkASTDecl()
164 void visitVarDecl(const VarDecl *V) const { in visitVarDecl()
189 dyn_cast_or_null<VarDecl>(Ref->getFoundDecl())) { in visitVarDecl()
217 bool shouldSkipVarDecl(const VarDecl *V) const { in shouldSkipVarDecl()
228 void reportBug(const VarDecl *V) const { in reportBug()
/llvm-project-15.0.7/clang/lib/AST/
H A DStmtIterator.cpp48 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) in NextVA()
75 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { in HandleDecl()
116 VarDecl* VD = cast<VarDecl>(*DGI); in GetDeclExpr()
H A DDecl.cpp2041 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC, in VarDecl() function in VarDecl
2064 VarDecl *VarDecl::CreateDeserialized(ASTContext &C, unsigned ID) { in CreateDeserialized()
2075 VarDecl::TLSKind VarDecl::getTLSKind() const { in getTLSKind()
2165 VarDecl *VarDecl::getCanonicalDecl() { return getFirstDecl(); } in getCanonicalDecl()
2253 VarDecl *VarDecl::getActingDefinition() { in getActingDefinition()
2274 VarDecl *VarDecl::getDefinition(ASTContext &C) { in getDefinition()
2296 const Expr *VarDecl::getAnyInitializer(const VarDecl *&D) const { in getAnyInitializer()
2331 VarDecl *VarDecl::getInitializingDeclaration() { in getInitializingDeclaration()
2589 VarDecl *VarDecl::getTemplateInstantiationPattern() const { in getTemplateInstantiationPattern()
2647 VarDecl *VarDecl::getInstantiatedFromStaticDataMember() const { in getInstantiatedFromStaticDataMember()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/
H A DUnnecessaryCopyInitialization.cpp34 void recordFixes(const VarDecl &Var, ASTContext &Context, in recordFixes()
162 if (const auto *OrigVar = selectFirst<VarDecl>(ObjectArgId, Matches)) in isInitializingVariableImmutable()
166 if (const auto *OrigVar = selectFirst<VarDecl>(OldVarDeclId, Matches)) in isInitializingVariableImmutable()
173 bool isVariableUnused(const VarDecl &Var, const Stmt &BlockStmt, in isVariableUnused()
205 QualType constructorArgumentType(const VarDecl *OldVar, in constructorArgumentType()
267 const auto *NewVar = Result.Nodes.getNodeAs<VarDecl>("newVarDecl"); in check()
268 const auto *OldVar = Result.Nodes.getNodeAs<VarDecl>(OldVarDeclId); in check()
269 const auto *ObjectArg = Result.Nodes.getNodeAs<VarDecl>(ObjectArgId); in check()
307 const VarDecl &Var, const Stmt &BlockStmt, const DeclStmt &Stmt, in handleCopyFromMethodReturn()
308 bool IssueFix, const VarDecl *ObjectArg, ASTContext &Context) { in handleCopyFromMethodReturn()
[all …]
H A DUnnecessaryCopyInitialization.h38 void handleCopyFromMethodReturn(const VarDecl &Var, const Stmt &BlockStmt,
40 const VarDecl *ObjectArg,
42 void handleCopyFromLocalVar(const VarDecl &NewVar, const VarDecl &OldVar,
/llvm-project-15.0.7/clang/unittests/AST/
H A DASTTypeTraitsTest.cpp31 EXPECT_FALSE(DNT<VarDecl>().isNone()); in TEST()
35 EXPECT_TRUE(DNT<Decl>().isBaseOf(DNT<VarDecl>())); in TEST()
36 EXPECT_FALSE(DNT<Decl>().isSame(DNT<VarDecl>())); in TEST()
37 EXPECT_FALSE(DNT<VarDecl>().isBaseOf(DNT<Decl>())); in TEST()
85 EXPECT_TRUE(DNT<VarDecl>().isSame( in TEST()
86 ASTNodeKind::getMostDerivedType(DNT<VarDecl>(), DNT<VarDecl>()))); in TEST()
90 ASTNodeKind::getMostDerivedType(DNT<IfStmt>(), DNT<VarDecl>()).isNone()); in TEST()
100 EXPECT_TRUE(DNT<VarDecl>().isSame(ASTNodeKind::getMostDerivedCommonAncestor( in TEST()
101 DNT<VarDecl>(), DNT<VarDecl>()))); in TEST()
110 DNT<IfStmt>(), DNT<VarDecl>()).isNone()); in TEST()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A DThrowByValueCatchByReferenceCheck.cpp57 if (auto *VarDecl = dyn_cast<clang::VarDecl>(ValueDecl)) in isCatchVariable() local
58 return VarDecl->isExceptionVariable(); in isCatchVariable()
141 auto *VarDecl = CatchStmt->getExceptionDecl(); in diagnoseCatchLocations() local
150 diag(VarDecl->getBeginLoc(), DiagMsgCatchReference); in diagnoseCatchLocations()
158 diag(VarDecl->getBeginLoc(), DiagMsgCatchReference); in diagnoseCatchLocations()
168 diag(VarDecl->getBeginLoc(), DiagMsgCatchReference); in diagnoseCatchLocations()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/
H A DIdDependentBackwardBranchCheck.h29 IdDependencyRecord(const VarDecl *Declaration, SourceLocation Location, in IdDependencyRecord()
38 const VarDecl *VariableDeclaration = nullptr;
44 std::map<const VarDecl *, IdDependencyRecord> IdDepVarsMap;
55 void saveIdDepVar(const Stmt *Statement, const VarDecl *Variable);
63 const VarDecl *PotentialVar);
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DVarBypassDetector.h26 class VarDecl; variable
42 llvm::SmallVector<std::pair<unsigned, const VarDecl *>, 48> Scopes;
48 llvm::DenseSet<const VarDecl *> Bypasses;
57 bool IsBypassed(const VarDecl *D) const { in IsBypassed()
H A DCGOpenMPRuntime.h48 class VarDecl; variable
105 SmallVector<CanonicalDeclPtr<const VarDecl>, 4> PrivateLocals;
154 SmallVector<const VarDecl *, 4> BaseDecls;
259 const llvm::MapVector<CanonicalDeclPtr<const VarDecl>,
749 llvm::MapVector<CanonicalDeclPtr<const VarDecl>,
998 const VarDecl *PartIDVar, const VarDecl *TaskTVar,
1285 const VarDecl *VD,
1945 const VarDecl *ThreadIDVar,
1959 const VarDecl *ThreadIDVar,
1980 const VarDecl *PartIDVar, const VarDecl *TaskTVar,
[all …]
/llvm-project-15.0.7/clang/include/clang/Analysis/Analyses/
H A DLiveVariables.h34 llvm::ImmutableSet<const VarDecl *> liveDecls;
43 llvm::ImmutableSet<const VarDecl *> LiveDecls, in LivenessValues()
49 bool isLive(const VarDecl *D) const;
78 bool isLive(const CFGBlock *B, const VarDecl *D);
84 bool isLive(const Stmt *S, const VarDecl *D);
/llvm-project-15.0.7/clang/test/Index/
H A Dobjc-typeargs-protocols.m24 // CHECK: VarDecl=a:17:6 [type=Foo *] [typekind=ObjCObjectPointer] [basetype=Foo] [basekind=ObjCInt…
25 // CHECK: VarDecl=b:18:24 [type=Foo<TestA *,TestB *> *] [typekind=ObjCObjectPointer] [basetype=Foo]…
26 // CHECK: VarDecl=c:19:11 [type=Foo<Bar> *] [typekind=ObjCObjectPointer] [basetype=Foo] [basekind=O…
27 // CHECK: VarDecl=d:20:29 [type=Foo<TestA *,TestB *><Bar> *] [typekind=ObjCObjectPointer] [basetype…
28 // CHECK: VarDecl=e:21:9 [type=id<Bar>] [typekind=ObjCObjectPointer] [basetype=id] [basekind=ObjCId…
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DStandardLibraryTest.cpp86 auto *Vec = cast<VarDecl>(lookup(AST, "vec")).getType()->getAsCXXRecordDecl(); in TEST()
88 cast<VarDecl>(lookup(AST, "nest")).getType()->getAsCXXRecordDecl(); in TEST()
90 cast<VarDecl>(lookup(AST, "clock")).getType()->getAsCXXRecordDecl(); in TEST()
91 auto *Sec = cast<VarDecl>(lookup(AST, "sec")).getType()->getAsCXXRecordDecl(); in TEST()
93 cast<VarDecl>(lookup(AST, "div")).getType()->getAsCXXRecordDecl(); in TEST()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DLambdaCapture.h74 VarDecl *Var = nullptr,
89 return isa_and_nonnull<VarDecl>(DeclAndBits.getPointer()); in capturesVariable()
104 VarDecl *getCapturedVar() const { in getCapturedVar()
106 return static_cast<VarDecl *>(DeclAndBits.getPointer()); in getCapturedVar()
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DScopeInfo.h61 class VarDecl; variable
208 VarDecl *CoroutinePromise = nullptr;
225 llvm::TinyPtrVector<VarDecl *> ByrefBlockVars;
480 void addByrefBlockVar(VarDecl *VD) { in addByrefBlockVar()
556 VarDecl *CapturedVar;
642 VarDecl *getVariable() const { in getVariable()
681 llvm::DenseMap<VarDecl*, unsigned> CaptureMap;
725 bool isCaptured(VarDecl *Var) const { in isCaptured()
734 Capture &getCapture(VarDecl *Var) { in getCapture()
906 const VarDecl *VD;
[all …]
/llvm-project-15.0.7/clang/include/clang/Analysis/
H A DCloneDetection.h25 class VarDecl; variable
360 std::vector<const VarDecl *> Variables;
365 void addVariableOccurence(const VarDecl *VarDecl, const Stmt *Mention);
385 const VarDecl *Variable;
391 const VarDecl *Suggestion;
392 SuspiciousCloneInfo(const VarDecl *Variable, const Stmt *Mention, in SuspiciousCloneInfo()
393 const VarDecl *Suggestion) in SuspiciousCloneInfo()

12345678910>>...18