Home
last modified time | relevance | path

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

12345

/external/clang/lib/Analysis/
DPseudoConstantAnalysis.cpp41 bool PseudoConstantAnalysis::isPseudoConstant(const VarDecl *VD) { in isPseudoConstant() argument
43 if (!VD->hasLocalStorage() && !VD->isStaticLocal()) in isPseudoConstant()
53 return !NonConstants->count(VD); in isPseudoConstant()
57 bool PseudoConstantAnalysis::wasReferenced(const VarDecl *VD) { in wasReferenced() argument
65 return UsedVars->count(VD); in wasReferenced()
124 const VarDecl *VD = dyn_cast<VarDecl>(LHSDecl); in RunAnalysis() local
126 if (VD) in RunAnalysis()
127 NonConstants->insert(VD); in RunAnalysis()
158 const VarDecl *VD = dyn_cast<VarDecl>(D); in RunAnalysis() local
159 if (VD) in RunAnalysis()
[all …]
DUninitializedValues.cpp296 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() local
297 if (isTrackedVar(VD, DC)) in findVar()
298 return FindVarResult(VD, DRE); in findVar()
318 bool isTrackedVar(const VarDecl *VD) const { in isTrackedVar()
319 return ::isTrackedVar(VD, DC); in isTrackedVar()
341 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() local
342 if (!VD || !isTrackedVar(VD)) in get()
350 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr() argument
351 if (Expr *Init = VD->getInit()) { in getSelfInitExpr()
353 = dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init)); in getSelfInitExpr()
[all …]
DLiveVariables.cpp307 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { in Visit() local
308 for (const VariableArrayType* VA = FindVA(VD->getType()); in Visit()
358 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitBinaryOperator() local
360 if (VD->getType()->isReferenceType()) in VisitBinaryOperator()
363 if (!isAlwaysAlive(VD)) { in VisitBinaryOperator()
365 val.liveDecls = LV.DSetFact.remove(val.liveDecls, VD); in VisitBinaryOperator()
379 const VarDecl *VD = *I; in VisitBlockExpr() local
380 if (isAlwaysAlive(VD)) in VisitBlockExpr()
382 val.liveDecls = LV.DSetFact.add(val.liveDecls, VD); in VisitBlockExpr()
395 if (VarDecl *VD = dyn_cast<VarDecl>(*DI)) { in VisitDeclStmt() local
[all …]
DAnalysisDeclContext.cpp128 const VarDecl *VD = it->getVariable(); in getSelfDecl() local
129 if (VD->getName() == "self") in getSelfDecl()
130 return dyn_cast<ImplicitParamDecl>(VD); in getSelfDecl()
402 bool IsTrackedDecl(const VarDecl *VD) { in IsTrackedDecl() argument
403 const DeclContext *DC = VD->getDeclContext(); in IsTrackedDecl()
415 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitDeclRefExpr() local
416 if (!VD->hasLocalStorage()) { in VisitDeclRefExpr()
417 if (Visited.insert(VD)) in VisitDeclRefExpr()
418 BEVals.push_back(VD, BC); in VisitDeclRefExpr()
DCFG.cpp35 if (VarDecl *VD = dyn_cast<VarDecl>(D)) in GetEndLoc() local
36 if (Expr *Ex = VD->getInit()) in GetEndLoc()
184 void addVar(VarDecl *VD) { in addVar() argument
185 Vars.push_back(VD, ctx); in addVar()
444 LocalScope* addLocalScopeForVarDecl(VarDecl *VD, LocalScope* Scope = NULL);
469 void appendAutomaticObjDtor(CFGBlock *B, VarDecl *VD, Stmt *S) { in appendAutomaticObjDtor() argument
470 B->appendAutomaticObjDtor(VD, S, cfg->getBumpVectorContext()); in appendAutomaticObjDtor()
951 if (VarDecl *VD = dyn_cast<VarDecl>(*DI)) in addLocalScopeForDeclStmt() local
952 Scope = addLocalScopeForVarDecl(VD, Scope); in addLocalScopeForDeclStmt()
960 LocalScope* CFGBuilder::addLocalScopeForVarDecl(VarDecl *VD, in addLocalScopeForVarDecl() argument
[all …]
/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 …]
DAPValue.cpp369 if (const ValueDecl *VD = Base.dyn_cast<const ValueDecl*>()) in printPretty() local
370 Out << *VD; in printPretty()
388 if (const ValueDecl *VD = Base.dyn_cast<const ValueDecl*>()) { in printPretty() local
389 Out << *VD; in printPretty()
390 ElemTy = VD->getType(); in printPretty()
409 const ValueDecl *VD = cast<ValueDecl>(BaseOrMember); in printPretty() local
413 Out << *VD; in printPretty()
414 ElemTy = VD->getType(); in printPretty()
490 if (const ValueDecl *VD = getMemberPointerDecl()) { in printPretty() local
491 Out << '&' << *cast<CXXRecordDecl>(VD->getDeclContext()) << "::" << *VD; in printPretty()
/external/clang/lib/StaticAnalyzer/Checkers/
DDeadStoresChecker.cpp202 void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val, in CheckVarDecl() argument
206 if (!VD->hasLocalStorage()) in CheckVarDecl()
210 if (VD->getType()->getAs<ReferenceType>()) in CheckVarDecl()
213 if (!isLive(Live, VD) && in CheckVarDecl()
214 !(VD->getAttr<UnusedAttr>() || VD->getAttr<BlocksAttr>())) { in CheckVarDecl()
218 Report(VD, dsk, ExLoc, Val->getSourceRange()); in CheckVarDecl()
224 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef() local
225 CheckVarDecl(VD, DR, Val, dsk, Live); in CheckDeclRef()
228 bool isIncrement(VarDecl *VD, const BinaryOperator* B) { in isIncrement() argument
241 if (DR->getDecl() == VD) in isIncrement()
[all …]
DUndefCapturedBlockVarChecker.cpp38 const VarDecl *VD) { in FindBlockDeclRefExpr() argument
40 if (BR->getDecl() == VD) in FindBlockDeclRefExpr()
46 const DeclRefExpr *BR = FindBlockDeclRefExpr(child, VD); in FindBlockDeclRefExpr()
72 const VarDecl *VD = VR->getDecl(); in checkPostStmt() local
74 if (VD->getAttr<BlocksAttr>() || !VD->hasLocalStorage()) in checkPostStmt()
88 os << "Variable '" << VD->getName() in checkPostStmt()
92 if (const Expr *Ex = FindBlockDeclRefExpr(BE->getBody(), VD)) in checkPostStmt()
DIdempotentOperationChecker.cpp478 const VarDecl *VD = dyn_cast<VarDecl>(LHS_DR->getDecl()); in isSelfAssign() local
479 if (!VD) in isSelfAssign()
486 if (VD != RHS_DR->getDecl()) in isSelfAssign()
503 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()); in isUnused() local
504 if (!VD) in isUnused()
507 if (AC->getPseudoConstantAnalysis()->wasReferenced(VD)) in isUnused()
522 const VarDecl *VD = dyn_cast<VarDecl>(LHS_DR->getDecl()); in isTruncationExtensionAssignment() local
523 if (!VD) in isTruncationExtensionAssignment()
530 if (VD != RHS_DR->getDecl()) in isTruncationExtensionAssignment()
712 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()); in isConstantOrPseudoConstant() local
[all …]
DLLVMConventionsChecker.cpp132 void VisitVarDecl(VarDecl *VD);
145 if (VarDecl *VD = dyn_cast<VarDecl>(*I)) in VisitDeclStmt() local
146 VisitVarDecl(VD); in VisitDeclStmt()
149 void StringRefCheckerVisitor::VisitVarDecl(VarDecl *VD) { in VisitVarDecl() argument
150 Expr *Init = VD->getInit(); in VisitVarDecl()
156 if (!IsLLVMStringRef(VD->getType())) in VisitVarDecl()
181 PathDiagnosticLocation::createBegin(VD, BR.getSourceManager()); in VisitVarDecl()
DVLASizeChecker.cpp82 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); in checkPreStmt() local
83 if (!VD) in checkPreStmt()
87 const VariableArrayType *VLA = Ctx.getAsVariableArrayType(VD->getType()); in checkPreStmt()
147 state->getRegion(VD, LC)->getExtent(svalBuilder); in checkPreStmt()
DUndefinedAssignmentChecker.cpp71 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); in checkBind() local
72 ex = VD->getInit(); in checkBind()
/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/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/lib/ARCMigrate/
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.cpp352 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local
355 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused()
361 DeclToCheck = VD->getMostRecentDecl(); in ShouldRemoveFromUnused()
362 if (DeclToCheck != VD) in ShouldRemoveFromUnused()
674 VarDecl *VD = (*T)->getActingDefinition(); in ActOnEndOfTranslationUnit() local
679 if (VD == 0 || VD->isInvalidDecl() || !Seen.insert(VD)) in ActOnEndOfTranslationUnit()
683 = Context.getAsIncompleteArrayType(VD->getType())) { in ActOnEndOfTranslationUnit()
684 if (RequireCompleteType(VD->getLocation(), in ActOnEndOfTranslationUnit()
687 VD->setInvalidDecl(); in ActOnEndOfTranslationUnit()
692 Diag(VD->getLocation(), diag::warn_tentative_incomplete_array); in ActOnEndOfTranslationUnit()
[all …]
DAnalysisBasedWarnings.cpp433 static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) { in SuggestInitializationFixit() argument
434 QualType VariableTy = VD->getType().getCanonicalType(); in SuggestInitializationFixit()
436 !VD->hasAttr<BlocksAttr>()) { in SuggestInitializationFixit()
437 S.Diag(VD->getLocation(), diag::note_block_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
438 << FixItHint::CreateInsertion(VD->getLocation(), "__block "); in SuggestInitializationFixit()
443 if (VD->getInit()) in SuggestInitializationFixit()
452 if (VD->getLocEnd().isMacroID()) in SuggestInitializationFixit()
455 SourceLocation Loc = S.PP.getLocForEndOfToken(VD->getLocEnd()); in SuggestInitializationFixit()
457 S.Diag(Loc, diag::note_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
491 static void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, in DiagUninitUse() argument
[all …]
DJumpDiagnostics.cpp125 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in GetDiagForGotoScopeDecl() local
127 if (VD->getType()->isVariablyModifiedType()) in GetDiagForGotoScopeDecl()
130 if (VD->hasAttr<BlocksAttr>()) in GetDiagForGotoScopeDecl()
134 if (VD->hasAttr<CleanupAttr>()) in GetDiagForGotoScopeDecl()
138 if (Context.getLangOpts().ObjCAutoRefCount && VD->hasLocalStorage()) { in GetDiagForGotoScopeDecl()
139 switch (VD->getType().getObjCLifetime()) { in GetDiagForGotoScopeDecl()
152 if (Context.getLangOpts().CPlusPlus && VD->hasLocalStorage()) { in GetDiagForGotoScopeDecl()
167 const Expr *Init = VD->getInit(); in GetDiagForGotoScopeDecl()
241 if (VarDecl *VD = dyn_cast<VarDecl>(D)) in BuildScopeInformation() local
242 if (Expr *Init = VD->getInit()) in BuildScopeInformation()
/external/clang/include/clang/Analysis/Analyses/
DPseudoConstantAnalysis.h28 bool isPseudoConstant(const VarDecl *VD);
29 bool wasReferenced(const VarDecl *VD);
/external/clang/lib/Rewrite/Frontend/
DRewriteObjC.cpp284 ValueDecl *VD, bool def=false);
293 void RewriteBlockPointerTypeVariable(std::string& Str, ValueDecl *VD);
296 void RewriteTypeOfDecl(VarDecl *VD);
323 void RewriteBlockPointerDecl(NamedDecl *VD);
324 void RewriteByRefVar(VarDecl *VD);
325 Stmt *RewriteBlockDeclRefExpr(DeclRefExpr *VD);
382 std::string SynthesizeByrefCopyDestroyHelper(VarDecl *VD, int flag);
1534 ValueDecl *VD = cast<ValueDecl>(DR->getDecl()); in RewriteObjCForCollectionStmt() local
1535 if (VD->getType()->isObjCQualifiedIdType() || in RewriteObjCForCollectionStmt()
1536 VD->getType()->isObjCQualifiedInterfaceType()) in RewriteObjCForCollectionStmt()
[all …]
/external/clang/test/CodeGenCXX/
Dmangle-alias-template.cpp24 Vec<double> VD; in z() local
25 g(VD); in z()
/external/clang/lib/CodeGen/
DCGExpr.cpp177 if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl)) { in CreateReferenceTemporary() local
178 if (VD->hasGlobalStorage()) { in CreateReferenceTemporary()
181 CGF.CGM.getCXXABI().getMangleContext().mangleReferenceTemporary(VD, Out); in CreateReferenceTemporary()
417 const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl); in EmitReferenceBindingToExpr() local
418 if (VD && VD->hasGlobalStorage()) { in EmitReferenceBindingToExpr()
459 bool precise = VD && VD->hasAttr<ObjCPreciseLifetimeAttr>(); in EmitReferenceBindingToExpr()
1645 if (const VarDecl *VD = dyn_cast<VarDecl>(Exp->getDecl())) { in setObjCGCLValueClass() local
1646 if (VD->hasGlobalStorage()) { in setObjCGCLValueClass()
1648 LV.setThreadLocalRef(VD->isThreadSpecified()); in setObjCGCLValueClass()
1725 const Expr *E, const VarDecl *VD) { in EmitGlobalVarDeclLValue() argument
[all …]
DCGDebugInfo.cpp2376 llvm::DIType CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD, in EmitTypeForVarWithBlocksAttr() argument
2384 llvm::DIFile Unit = getOrCreateFile(VD->getLocation()); in EmitTypeForVarWithBlocksAttr()
2385 QualType Type = VD->getType(); in EmitTypeForVarWithBlocksAttr()
2395 bool HasCopyAndDispose = CGM.getContext().BlockRequiresCopying(Type, VD); in EmitTypeForVarWithBlocksAttr()
2412 CharUnits Align = CGM.getContext().getDeclAlign(VD); in EmitTypeForVarWithBlocksAttr()
2436 FieldTy = DBuilder.createMemberType(Unit, VD->getName(), Unit, in EmitTypeForVarWithBlocksAttr()
2451 void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag, in EmitDeclare() argument
2457 llvm::DIFile Unit = getOrCreateFile(VD->getLocation()); in EmitDeclare()
2460 if (VD->hasAttr<BlocksAttr>()) in EmitDeclare()
2461 Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset); in EmitDeclare()
[all …]
/external/clang/lib/StaticAnalyzer/Core/
DCheckerHelpers.cpp55 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in containsStaticLocal() local
56 if (VD->isStaticLocal()) in containsStaticLocal()

12345