Home
last modified time | relevance | path

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

12345678910>>...21

/llvm-project/clang/test/AST/HLSL/
H A Dpackoffset.hlsl9 // CHECK-NEXT: VarDecl {{.*}} A1 'hlsl_constant float4'
12 // CHECK-NEXT: VarDecl {{.*}} col:11 A2 'hlsl_constant float'
15 // CHECK-NEXT: VarDecl {{.*}} col:11 A3 'hlsl_constant float'
23 // CHECK: VarDecl {{.*}} B0 'hlsl_constant float'
26 // CHECK-NEXT: VarDecl {{.*}} B1 'hlsl_constant double'
29 // CHECK-NEXT: VarDecl {{.*}} B2 'hlsl_constant half'
37 // CHECK: VarDecl {{.*}} C0 'hlsl_constant float'
40 // CHECK-NEXT: VarDecl {{.*}} C1 'hlsl_constant float2'
43 // CHECK-NEXT: VarDecl {{.*}} C2 'hlsl_constant half'
52 // CHECK: VarDecl {{
[all...]
H A Dast-dump-comment-cbuffe-tbufferr.hlsl
/llvm-project/clang/test/SemaOpenCLCXX/
H A Daddrspace-auto.clcpp4 //CHECK: |-VarDecl {{.*}} ai '__global int'
9 //CHECK: VarDecl {{.*}} ai '__private int'
13 //CHECK: VarDecl {{.*}} used cai '__constant int'
15 //CHECK: VarDecl {{.*}} aii '__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/clang/lib/ARCMigrate/
H A DTransBlockObjCVariable.cpp41 llvm::DenseSet<VarDecl *> &VarsToChange;
44 VarDecl *Var;
48 BlockVarChecker(VarDecl *var) : Var(var) { } in BlockVarChecker()
74 RootBlockObjCVarRewriter(llvm::DenseSet<VarDecl *> &VarsToChange) in RootBlockObjCVarRewriter()
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()
[all …]
/llvm-project/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()
62 EHCodeVisitor(llvm::DenseSet<const VarDecl *> &S) : in EHCodeVisitor()
137 llvm::SmallPtrSet<const VarDecl*, 20> Escaped;
140 std::unique_ptr<llvm::DenseSet<const VarDecl *>> InEH;
148 llvm::SmallPtrSet<const VarDecl *, 20> &escaped, in DeadStoreObs() argument
155 bool isLive(const LiveVariables::LivenessValues &Live, const VarDecl *D) { in isLive()
161 InEH.reset(new llvm::DenseSet<const VarDecl *>()); in isLive()
192 void Report(const VarDecl *
[all...]
/llvm-project/clang/lib/Analysis/
H A DUninitializedValues.cpp60 static bool isTrackedVar(const VarDecl *vd, const DeclContext *dc) { in isTrackedVar()
79 llvm::DenseMap<const VarDecl *, unsigned> map;
91 std::optional<unsigned> getValueIndex(const VarDecl *d) const;
98 DeclContext::specific_decl_iterator<VarDecl> I(dc.decls_begin()), in computeMap()
101 const VarDecl *vd = *I; in computeMap()
107 std::optional<unsigned> DeclToIndex::getValueIndex(const VarDecl *d) const { in getValueIndex()
108 llvm::DenseMap<const VarDecl *, unsigned>::const_iterator I = map.find(d); in getValueIndex()
164 ValueVector::reference operator[](const VarDecl *vd);
167 const VarDecl *vd) { in getValue()
227 ValueVector::reference CFGBlockValues::operator[](const VarDecl *vd) { in operator []()
[all …]
H A DUnsafeBufferUsage.cpp1045 virtual std::optional<std::pair<const VarDecl *, const VarDecl *>> in classof()
1275 if (isa<VarDecl>(DRE->getDecl())) in matcher()
1290 const VarDecl *PtrInitLHS; // the LHS pointer expression in `PI`
1296 PtrInitLHS(Result.Nodes.getNodeAs<VarDecl>(PointerInitLHSTag)),
1323 virtual std::optional<std::pair<const VarDecl *, const VarDecl *>> in matcher()
1325 return std::make_pair(PtrInitLHS, cast<VarDecl>(PtrInitRHS->getDecl())); in matcher()
1371 virtual std::optional<std::pair<const VarDecl *, const VarDecl *>> in matcher()
2835 eraseVarsForUnfixableGroupMates(std::map<const VarDecl *,FixItList> & FixItsForVariable,const VariableGroupsManager & VarGrpMgr) eraseVarsForUnfixableGroupMates() argument
2864 createFunctionOverloadsForParms(std::map<const VarDecl *,FixItList> & FixItsForVariable,const VariableGroupsManager & VarGrpMgr,const FunctionDecl * FD,const FixitStrategy & S,ASTContext & Ctx,UnsafeBufferUsageHandler & Handler) createFunctionOverloadsForParms() argument
3007 VariableGroupsManagerImpl(const std::vector<VarGrpTy> & Groups,const std::map<const VarDecl *,unsigned> & VarGrpMap,const llvm::SetVector<const VarDecl * > & GrpsUnionForParms) VariableGroupsManagerImpl() argument
[all...]
H A DLiveVariables.cpp32 llvm::ImmutableSet<const VarDecl *>::Factory DSetFact;
71 bool LiveVariables::LivenessValues::isLive(const VarDecl *D) const { in isLive()
110 llvm::ImmutableSetRef<const VarDecl *> in merge()
137 static bool isAlwaysAlive(const VarDecl *D) { in isAlwaysAlive()
141 bool LiveVariables::isLive(const CFGBlock *B, const VarDecl *D) { in isLive()
145 bool LiveVariables::isLive(const Stmt *S, const VarDecl *D) { in isLive()
271 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { in Visit()
364 static bool writeShouldKill(const VarDecl *VD) { in VisitBinaryOperator()
394 } else if (const auto *VD = dyn_cast<VarDecl>( in VisitDeclRefExpr()
[all...]
/llvm-project/clang-tools-extra/clang-tidy/utils/
H A DDeclRefExprUtils.h20 allDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context);
24 allDeclRefExprs(const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context);
45 constReferenceDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt,
51 bool isOnlyUsedAsConst(const VarDecl &Var, const Stmt &Stmt,
H A DAliasing.cpp17 static bool isAccessForVar(const Stmt *S, const VarDecl *Var) { in isAccessForVar()
24 static bool capturesByRef(const CXXRecordDecl *RD, const VarDecl *Var) { in capturesByRef()
32 static bool isPtrOrReferenceForVar(const Stmt *S, const VarDecl *Var) { in isPtrOrReferenceForVar()
39 if (const auto *LeftVar = dyn_cast<VarDecl>(D)) { in isPtrOrReferenceForVar()
64 static bool hasPtrOrReferenceInStmt(const Stmt *S, const VarDecl *Var) { in hasPtrOrReferenceInStmt()
80 const VarDecl *Var) { in refersToEnclosingLambdaCaptureByRef()
92 bool hasPtrOrReferenceInFunc(const Decl *Func, const VarDecl *Var) { in hasPtrOrReferenceInFunc()
H A DDeclRefExprUtils.cpp349 constReferenceDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, in constReferenceDeclRefExprs() argument
351 auto Matches = match(findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl))), in constReferenceDeclRefExprs()
361 bool isOnlyUsedAsConst(const VarDecl &Var, const Stmt &Stmt, in isOnlyUsedAsConst()
375 allDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context) { in allDeclRefExprs() argument
377 findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")), in allDeclRefExprs()
385 allDeclRefExprs(const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context) { in allDeclRefExprs() argument
388 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))), in allDeclRefExprs()
/llvm-project/clang/include/clang/Analysis/Analyses/
H A DUnsafeBufferUsage.h25 using VarGrpTy = std::vector<const VarDecl *>;
26 using VarGrpRef = ArrayRef<const VarDecl *>;
38 virtual VarGrpRef getGroupOfVar(const VarDecl *Var,
61 using MapTy = llvm::DenseMap<const VarDecl *, Kind>;
72 void set(const VarDecl *VD, Kind K) { Map[VD] = K; }
74 Kind lookup(const VarDecl *VD) const { in lookup()
94 using DebugNoteByVar = std::map<const VarDecl *, DebugNoteList>;
136 handleUnsafeVariableGroup(const VarDecl *Variable, in addDebugNoteForVar()
148 void addDebugNoteForVar(const VarDecl *VD, SourceLocation Loc,
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/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()
[all …]
/llvm-project/clang/lib/CodeGen/
H A DCGOpenMPRuntime.h48 class VarDecl; variable
105 SmallVector<CanonicalDeclPtr<const VarDecl>, 4> PrivateLocals;
156 SmallVector<const VarDecl *, 4> BaseDecls;
217 const VarDecl *getBaseDecl(unsigned N) const { return BaseDecls[N]; }
225 return cast<VarDecl>(cast<DeclRefExpr>(ClausesData[N].Private)->getDecl()) in getPrivateType()
261 const llvm::MapVector<CanonicalDeclPtr<const VarDecl>,
493 llvm::SmallDenseSet<const VarDecl *> DeferredGlobalVariables;
501 llvm::MapVector<CanonicalDeclPtr<const VarDecl>,
541 llvm::Constant *getOrCreateThreadPrivateCache(const VarDecl *VD);
672 const VarDecl *V
[all...]
H A DCGOpenMPRuntimeGPU.h142 const VarDecl *VD) const override;
146 getKmpcAllocShared(CodeGenFunction &CGF, const VarDecl *VD) override;
192 const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind,
207 const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind,
285 const VarDecl *translateParameter(const FieldDecl *FD,
286 const VarDecl *NativeParam) const override;
292 Address getParameterAddress(CodeGenFunction &CGF, const VarDecl *NativeParam,
293 const VarDecl *TargetParam) const override;
308 const VarDecl *VD) override;
336 bool hasAllocateAttributeForGlobalVar(const VarDecl *V
[all...]
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()
/llvm-project/clang/lib/AST/
H A DStmtIterator.cpp47 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) in NextVA()
74 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { in HandleDecl()
115 VarDecl* VD = cast<VarDecl>(*DGI); in GetDeclExpr()
H A DDecl.cpp594 if (auto *VD = dyn_cast<VarDecl>(D)) in getExternalLinkageFor()
609 const auto *Var = dyn_cast<VarDecl>(D); in getLVForNamespaceScopeDecl()
648 const VarDecl *PrevVar = Var->getPreviousDecl(); in getLVForNamespaceScopeDecl()
658 for (const VarDecl *PrevVar = Var->getPreviousDecl(); PrevVar; in getLVForNamespaceScopeDecl()
669 const VarDecl *VD = IFD->getVarDecl(); in getLVForNamespaceScopeDecl()
670 assert(VD && "Expected a VarDecl in this IndirectFieldDecl!"); in getLVForNamespaceScopeDecl()
678 const auto *Var = dyn_cast<VarDecl>(D); in getLVForNamespaceScopeDecl()
751 if (const auto *Var = dyn_cast<VarDecl>(D)) { in getLVForNamespaceScopeDecl()
928 isa<VarDecl>(D) || in getLVForClassMember()
1022 } else if (const auto *VD = dyn_cast<VarDecl>( in getLVForClassMember()
2116 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC, VarDecl() function in VarDecl
[all...]
/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DUncountedLocalVarsChecker.cpp
/llvm-project/clang-tools-extra/clang-tidy/misc/
H A DThrowByValueCatchByReferenceCheck.cpp55 if (auto *VarDecl = dyn_cast<clang::VarDecl>(ValueDecl)) in isCatchVariable() local
56 return VarDecl->isExceptionVariable(); in isCatchVariable()
139 auto *VarDecl = CatchStmt->getExceptionDecl(); in diagnoseCatchLocations() local
148 diag(VarDecl->getBeginLoc(), DiagMsgCatchReference); in diagnoseCatchLocations()
156 diag(VarDecl->getBeginLoc(), DiagMsgCatchReference); in diagnoseCatchLocations()
166 diag(VarDecl->getBeginLoc(), DiagMsgCatchReference); in diagnoseCatchLocations()
/llvm-project/clang-tools-extra/clang-tidy/performance/
H A DUnnecessaryCopyInitialization.cpp34 void recordFixes(const VarDecl &Var, ASTContext &Context, in recordFixes()
146 const VarDecl &InitializingVar, const Stmt &BlockStmt, ASTContext &Context, in isInitializingVariableImmutable()
172 if (const auto *OrigVar = selectFirst<VarDecl>(ObjectArgId, Matches)) in isInitializingVariableImmutable()
176 if (const auto *OrigVar = selectFirst<VarDecl>(OldVarDeclId, Matches)) in isInitializingVariableImmutable()
183 bool isVariableUnused(const VarDecl &Var, const Stmt &BlockStmt, in isVariableUnused()
215 QualType constructorArgumentType(const VarDecl *OldVar, in constructorArgumentType()
278 const auto &NewVar = *Result.Nodes.getNodeAs<VarDecl>("newVarDecl"); in check()
293 const auto *OldVar = Result.Nodes.getNodeAs<VarDecl>(OldVarDeclId); in check()
294 const auto *ObjectArg = Result.Nodes.getNodeAs<VarDecl>(ObjectArgId); in check()
326 const CheckContext &Ctx, const VarDecl *ObjectAr in handleCopyFromMethodReturn()
[all...]
/llvm-project/clang-tools-extra/clang-tidy/altera/
H A DIdDependentBackwardBranchCheck.h27 IdDependencyRecord(const VarDecl *Declaration, SourceLocation Location, in IdDependencyRecord()
36 const VarDecl *VariableDeclaration = nullptr;
42 std::map<const VarDecl *, IdDependencyRecord> IdDepVarsMap;
53 void saveIdDepVar(const Stmt *Statement, const VarDecl *Variable);
61 const VarDecl *PotentialVar);
/llvm-project/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()
/llvm-project/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…

12345678910>>...21