Home
last modified time | relevance | path

Searched refs:VD (Results 1 – 25 of 94) sorted by relevance

1234

/external/clang/lib/Analysis/
DPseudoConstantAnalysis.cpp40 bool PseudoConstantAnalysis::isPseudoConstant(const VarDecl *VD) { in isPseudoConstant() argument
42 if (!VD->hasLocalStorage() && !VD->isStaticLocal()) in isPseudoConstant()
52 return !NonConstants->count(VD); in isPseudoConstant()
56 bool PseudoConstantAnalysis::wasReferenced(const VarDecl *VD) { in wasReferenced() argument
64 return UsedVars->count(VD); in wasReferenced()
125 const VarDecl *VD = dyn_cast<VarDecl>(LHSDecl); in RunAnalysis() local
127 if (VD) in RunAnalysis()
128 NonConstants->insert(VD); in RunAnalysis()
159 const VarDecl *VD = dyn_cast<VarDecl>(D); in RunAnalysis() local
160 if (VD) in RunAnalysis()
[all …]
DLiveVariables.cpp67 void VisitVarDecl(VarDecl* VD) { in VisitVarDecl() argument
69 AD.Register(VD); in VisitVarDecl()
72 if (VD->hasGlobalStorage()) in VisitVarDecl()
73 AlwaysLive.push_back(VD); in VisitVarDecl()
212 VarDecl* VD = 0; in BlockStmt_VisitObjCForCollectionStmt() local
215 VD = cast<VarDecl>(DS->getSingleDecl()); in BlockStmt_VisitObjCForCollectionStmt()
219 VD = cast<VarDecl>(DR->getDecl()); in BlockStmt_VisitObjCForCollectionStmt()
226 if (VD) { in BlockStmt_VisitObjCForCollectionStmt()
227 LiveState(VD, AD) = Dead; in BlockStmt_VisitObjCForCollectionStmt()
245 if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitUnaryOperator() local
[all …]
DAnalysisContext.cpp323 bool IsTrackedDecl(const VarDecl *VD) { in IsTrackedDecl() argument
324 const DeclContext *DC = VD->getDeclContext(); in IsTrackedDecl()
336 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in VisitDeclRefExpr() local
337 if (!VD->hasLocalStorage()) { in VisitDeclRefExpr()
338 unsigned &flag = Visited[VD]; in VisitDeclRefExpr()
341 BEVals.push_back(VD, BC); in VisitDeclRefExpr()
347 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitBlockDeclRefExpr() local
348 unsigned &flag = Visited[VD]; in VisitBlockDeclRefExpr()
351 if (IsTrackedDecl(VD)) in VisitBlockDeclRefExpr()
352 BEVals.push_back(VD, BC); in VisitBlockDeclRefExpr()
DCFG.cpp33 if (VarDecl* VD = dyn_cast<VarDecl>(D)) in GetEndLoc() local
34 if (Expr* Ex = VD->getInit()) in GetEndLoc()
182 void addVar(VarDecl* VD) { in addVar() argument
183 Vars.push_back(VD, ctx); in addVar()
391 LocalScope* addLocalScopeForVarDecl(VarDecl* VD, LocalScope* Scope = NULL);
752 if (VarDecl* VD = dyn_cast<VarDecl>(*DI)) in addLocalScopeForDeclStmt() local
753 Scope = addLocalScopeForVarDecl(VD, Scope); in addLocalScopeForDeclStmt()
761 LocalScope* CFGBuilder::addLocalScopeForVarDecl(VarDecl* VD, in addLocalScopeForVarDecl() argument
767 switch (VD->getStorageClass()) { in addLocalScopeForVarDecl()
776 QualType QT = VD->getType(); in addLocalScopeForVarDecl()
[all …]
/external/clang/lib/StaticAnalyzer/Checkers/
DDeadStoresChecker.cpp137 void CheckVarDecl(VarDecl* VD, Expr* Ex, Expr* Val, in CheckVarDecl() argument
142 if (!VD->hasLocalStorage()) in CheckVarDecl()
146 if (VD->getType()->getAs<ReferenceType>()) in CheckVarDecl()
149 if (!Live(VD, AD) && in CheckVarDecl()
150 !(VD->getAttr<UnusedAttr>() || VD->getAttr<BlocksAttr>())) in CheckVarDecl()
151 Report(VD, dsk, Ex->getSourceRange().getBegin(), in CheckVarDecl()
158 if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef() local
159 CheckVarDecl(VD, DR, Val, dsk, AD, Live); in CheckDeclRef()
162 bool isIncrement(VarDecl* VD, BinaryOperator* B) { in isIncrement() argument
175 if (DR->getDecl() == VD) in isIncrement()
[all …]
DUndefCapturedBlockVarChecker.cpp36 const VarDecl *VD){ in FindBlockDeclRefExpr() argument
38 if (BR->getDecl() == VD) in FindBlockDeclRefExpr()
44 const BlockDeclRefExpr *BR = FindBlockDeclRefExpr(child, VD); in FindBlockDeclRefExpr()
69 const VarDecl *VD = VR->getDecl(); in checkPostStmt() local
71 if (VD->getAttr<BlocksAttr>() || !VD->hasLocalStorage()) in checkPostStmt()
76 VR = C.getSValBuilder().getRegionManager().getVarRegion(VD, LC); in checkPostStmt()
87 os << "Variable '" << VD->getName() in checkPostStmt()
91 if (const Expr *Ex = FindBlockDeclRefExpr(BE->getBody(), VD)) in checkPostStmt()
DIdempotentOperationChecker.cpp468 const VarDecl *VD = dyn_cast<VarDecl>(LHS_DR->getDecl()); in isSelfAssign() local
469 if (!VD) in isSelfAssign()
476 if (VD != RHS_DR->getDecl()) in isSelfAssign()
493 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()); in isUnused() local
494 if (!VD) in isUnused()
497 if (AC->getPseudoConstantAnalysis()->wasReferenced(VD)) in isUnused()
512 const VarDecl *VD = dyn_cast<VarDecl>(LHS_DR->getDecl()); in isTruncationExtensionAssignment() local
513 if (!VD) in isTruncationExtensionAssignment()
520 if (VD != RHS_DR->getDecl()) in isTruncationExtensionAssignment()
706 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()); in isConstantOrPseudoConstant() local
[all …]
DMallocChecker.cpp404 const VarDecl *VD; in SummarizeRegion() local
406 VD = VR->getDecl(); in SummarizeRegion()
408 VD = NULL; in SummarizeRegion()
410 if (VD) in SummarizeRegion()
411 os << "the address of the local variable '" << VD->getName() << "'"; in SummarizeRegion()
418 const VarDecl *VD; in SummarizeRegion() local
420 VD = VR->getDecl(); in SummarizeRegion()
422 VD = NULL; in SummarizeRegion()
424 if (VD) in SummarizeRegion()
425 os << "the address of the parameter '" << VD->getName() << "'"; in SummarizeRegion()
[all …]
DIteratorsChecker.cpp282 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); in handleAssign() local
283 if (!VD) in handleAssign()
285 const MemRegion *IMR = state->getRegion(VD, LC); in handleAssign()
307 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); in handleAssign() local
308 if (!VD) in handleAssign()
310 const MemRegion *IMR = state->getRegion(VD, LC); in handleAssign()
372 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); in getRegion() local
373 if (!VD) in getRegion()
376 return state->getRegion(VD, LC); in getRegion()
509 const VarDecl* VD = dyn_cast<VarDecl>(D); in checkPreStmt() local
[all …]
DLLVMConventionsChecker.cpp130 void VisitVarDecl(VarDecl *VD);
143 if (VarDecl *VD = dyn_cast<VarDecl>(*I)) in VisitDeclStmt() local
144 VisitVarDecl(VD); in VisitDeclStmt()
147 void StringRefCheckerVisitor::VisitVarDecl(VarDecl *VD) { in VisitVarDecl() argument
148 Expr *Init = VD->getInit(); in VisitVarDecl()
154 if (!IsLLVMStringRef(VD->getType())) in VisitVarDecl()
180 VD->getLocStart(), Init->getSourceRange()); in VisitVarDecl()
DVLASizeChecker.cpp41 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); in checkPreStmt() local
42 if (!VD) in checkPreStmt()
46 const VariableArrayType *VLA = Ctx.getAsVariableArrayType(VD->getType()); in checkPreStmt()
122 state->getRegion(VD, LC)->getExtent(svalBuilder); in checkPreStmt()
DDereferenceChecker.cpp50 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in AddDerefSource() local
52 << " variable '" << VD->getName() << "')"; in AddDerefSource()
147 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in checkLocation() local
149 os << "Instance variable access (via '" << VD->getName() in checkLocation()
/external/clang/lib/AST/
DStmtIterator.cpp44 if (VarDecl* VD = dyn_cast<VarDecl>(decl)) in NextVA() local
45 if (VD->Init) in NextVA()
51 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) in NextVA() local
52 if (VD->Init) in NextVA()
92 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { in HandleDecl() local
93 if (const VariableArrayType* VAPtr = FindVA(VD->getType().getTypePtr())) { in HandleDecl()
98 if (VD->getInit()) in HandleDecl()
142 VarDecl* VD = cast<VarDecl>(*DGI); in GetDeclExpr() local
143 return *VD->getInitAddress(); in GetDeclExpr()
148 if (VarDecl* VD = dyn_cast<VarDecl>(decl)) { in GetDeclExpr() local
[all …]
/external/clang/test/SemaCXX/
Ddestructor.cpp192 struct VD: VB {}; struct
226 VD vd; use(vd); in nowarnstack()
255 VD* vd = new VD[4]; in nowarnarray()
282 VB* vb = new VD(); in nowarn0()
286 VD* vd = new VD(); in nowarn0()
320 simple_ptr<VB> vb(new VD()); in nowarn1()
324 simple_ptr<VD> vd(new VD()); in nowarn1()
/external/clang/lib/ARCMigrate/
DTransAPIUses.cpp106 if (VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) in VisitObjCMessageExpr() local
107 if (VD->hasLocalStorage() && !ChangedNSDataVars.count(VD)) { in VisitObjCMessageExpr()
109 Pass.TA.insertAfterToken(VD->getLocation(), in VisitObjCMessageExpr()
111 ChangedNSDataVars.insert(VD); in VisitObjCMessageExpr()
DTransAutoreleasePool.cpp172 if (VarDecl *VD = dyn_cast<VarDecl>(DclS->getSingleDecl())) { in VisitCompoundStmt() local
173 if (isNSAutoreleasePool(VD->getType())) { in VisitCompoundStmt()
174 PoolVarInfo &info = PoolVars[VD]; in VisitCompoundStmt()
176 collectRefs(VD, S, info.Refs); in VisitCompoundStmt()
179 if (isPoolCreation(VD->getInit())) { in VisitCompoundStmt()
181 Scopes.back().PoolVar = VD; in VisitCompoundStmt()
190 if (VarDecl *VD = dyn_cast<VarDecl>(dref->getDecl())) { in VisitCompoundStmt() local
193 if (isNSAutoreleasePool(VD->getType()) && in VisitCompoundStmt()
196 Scopes.back().PoolVar = VD; in VisitCompoundStmt()
/external/clang/lib/Sema/
DSema.cpp325 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local
328 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused()
334 DeclToCheck = VD->getMostRecentDeclaration(); in ShouldRemoveFromUnused()
335 if (DeclToCheck != VD) in ShouldRemoveFromUnused()
477 VarDecl *VD = TentativeDefinitions[i]->getActingDefinition(); in ActOnEndOfTranslationUnit() local
482 if (VD == 0 || VD->isInvalidDecl() || !Seen.insert(VD)) in ActOnEndOfTranslationUnit()
486 = Context.getAsIncompleteArrayType(VD->getType())) { in ActOnEndOfTranslationUnit()
487 if (RequireCompleteType(VD->getLocation(), in ActOnEndOfTranslationUnit()
490 VD->setInvalidDecl(); in ActOnEndOfTranslationUnit()
495 Diag(VD->getLocation(), diag::warn_tentative_incomplete_array); in ActOnEndOfTranslationUnit()
[all …]
DAnalysisBasedWarnings.cpp208 ValueDecl *VD = DRE->getDecl(); in CheckFallThrough() local
209 if (VD->hasAttr<NoReturnAttr>()) { in CheckFallThrough()
423 static bool DiagnoseUninitializedUse(Sema &S, const VarDecl *VD, in DiagnoseUninitializedUse() argument
443 if (const Expr *Initializer = VD->getInit()) { in DiagnoseUninitializedUse()
454 << VD->getDeclName() << VD->getLocation() << DRE->getSourceRange(); in DiagnoseUninitializedUse()
457 << VD->getDeclName() << DRE->getSourceRange(); in DiagnoseUninitializedUse()
461 << VD->getDeclName() << DRE->getSourceRange(); in DiagnoseUninitializedUse()
468 << VD->getDeclName(); in DiagnoseUninitializedUse()
474 S.Diag(VD->getLocStart(), diag::note_uninit_var_def) in DiagnoseUninitializedUse()
475 << VD->getDeclName(); in DiagnoseUninitializedUse()
[all …]
DJumpDiagnostics.cpp123 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in GetDiagForGotoScopeDecl() local
125 if (VD->getType()->isVariablyModifiedType()) in GetDiagForGotoScopeDecl()
128 if (VD->hasAttr<BlocksAttr>()) in GetDiagForGotoScopeDecl()
132 if (VD->hasAttr<CleanupAttr>()) in GetDiagForGotoScopeDecl()
136 if (Context.getLangOptions().ObjCAutoRefCount && VD->hasLocalStorage()) { in GetDiagForGotoScopeDecl()
137 switch (VD->getType().getObjCLifetime()) { in GetDiagForGotoScopeDecl()
150 if (Context.getLangOptions().CPlusPlus && VD->hasLocalStorage()) { in GetDiagForGotoScopeDecl()
165 if (const Expr *init = VD->getInit()) { in GetDiagForGotoScopeDecl()
188 } else if (VD->getType()->isArrayType()) { in GetDiagForGotoScopeDecl()
189 record = VD->getType()->getBaseElementTypeUnsafe() in GetDiagForGotoScopeDecl()
[all …]
/external/qemu/
Dppc-dis.c829 #define VD VC + 1 macro
830 #define VS VD
834 #define SIMM VD + 1
2140 { "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
2177 { "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
2178 { "vaddfp", VX(4, 10), VX_MASK, PPCVEC, { VD, VA, VB } },
2179 { "vaddsbs", VX(4, 768), VX_MASK, PPCVEC, { VD, VA, VB } },
2180 { "vaddshs", VX(4, 832), VX_MASK, PPCVEC, { VD, VA, VB } },
2181 { "vaddsws", VX(4, 896), VX_MASK, PPCVEC, { VD, VA, VB } },
2182 { "vaddubm", VX(4, 0), VX_MASK, PPCVEC, { VD, VA, VB } },
[all …]
/external/clang/include/clang/Analysis/Analyses/
DPseudoConstantAnalysis.h28 bool isPseudoConstant(const VarDecl *VD);
29 bool wasReferenced(const VarDecl *VD);
/external/clang/lib/StaticAnalyzer/Core/
DBasicStore.cpp138 const VarDecl *VD = VR->getDecl(); in LazyRetrieve() local
139 QualType T = VD->getType(); in LazyRetrieve()
450 const VarDecl *VD = VR->getDecl(); in BindDeclInternal() local
454 if (VD->getType()->isArrayType() || VD->getType()->isStructureOrClassType()) in BindDeclInternal()
457 if (VD->hasGlobalStorage()) { in BindDeclInternal()
465 assert(!(VD->getStorageClass() == SC_Static && in BindDeclInternal()
466 VD->isFileVarDecl())); in BindDeclInternal()
469 if (VD->getStorageClass() == SC_Static) { in BindDeclInternal()
477 QualType T = VD->getType(); in BindDeclInternal()
490 QualType T = VD->getType(); in BindDeclInternal()
/external/clang/lib/Rewrite/
DRewriteObjC.cpp255 ValueDecl *VD, bool def=false);
263 void RewriteBlockPointerTypeVariable(std::string& Str, ValueDecl *VD);
266 void RewriteTypeOfDecl(VarDecl *VD);
362 void RewriteBlockPointerDecl(NamedDecl *VD);
363 void RewriteByRefVar(VarDecl *VD);
364 std::string SynthesizeByrefCopyDestroyHelper(VarDecl *VD, int flag);
365 Stmt *RewriteBlockDeclRefExpr(Expr *VD);
1637 ValueDecl *VD = cast<ValueDecl>(DR->getDecl()); in RewriteObjCForCollectionStmt() local
1638 if (VD->getType()->isObjCQualifiedIdType() || in RewriteObjCForCollectionStmt()
1639 VD->getType()->isObjCQualifiedInterfaceType()) in RewriteObjCForCollectionStmt()
[all …]
/external/clang/test/CodeGenCXX/
Dmangle-alias-template.cpp20 Vec<double> VD; in z() local
21 g(VD); in z()
/external/clang/lib/CodeGen/
DCGExpr.cpp179 if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl)) { in CreateReferenceTemporary() local
180 if (VD->hasGlobalStorage()) { in CreateReferenceTemporary()
183 CGF.CGM.getCXXABI().getMangleContext().mangleReferenceTemporary(VD, Out); in CreateReferenceTemporary()
448 const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl); in EmitReferenceBindingToExpr() local
449 if (VD && VD->hasGlobalStorage()) { in EmitReferenceBindingToExpr()
476 bool precise = VD && VD->hasAttr<ObjCPreciseLifetimeAttr>(); in EmitReferenceBindingToExpr()
1219 if (const VarDecl *VD = dyn_cast<VarDecl>(Exp->getDecl())) { in setObjCGCLValueClass() local
1220 if (VD->hasGlobalStorage()) { in setObjCGCLValueClass()
1222 LV.setThreadLocalRef(VD->isThreadSpecified()); in setObjCGCLValueClass()
1299 const Expr *E, const VarDecl *VD) { in EmitGlobalVarDeclLValue() argument
[all …]

1234