Home
last modified time | relevance | path

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

12345

/trueos/contrib/llvm/tools/clang/lib/Sema/
HDSemaOpenMP.cpp386 if (VarDecl *VD = dyn_cast_or_null<VarDecl>(ND)) { in ValidateCandidate() local
387 return VD->hasGlobalStorage() && in ValidateCandidate()
405 VarDecl *VD; in ActOnOpenMPIdExpression() local
414 VD = Corrected.getCorrectionDeclAs<VarDecl>(); in ActOnOpenMPIdExpression()
422 if (!(VD = Lookup.getAsSingle<VarDecl>())) { in ActOnOpenMPIdExpression()
433 if (!VD->hasGlobalStorage()) { in ActOnOpenMPIdExpression()
436 << !VD->isStaticLocal(); in ActOnOpenMPIdExpression()
437 bool IsDecl = VD->isThisDeclarationADefinition(Context) == in ActOnOpenMPIdExpression()
439 Diag(VD->getLocation(), in ActOnOpenMPIdExpression()
440 IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD; in ActOnOpenMPIdExpression()
[all …]
HDAnalysisBasedWarnings.cpp434 static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) { in SuggestInitializationFixit() argument
435 QualType VariableTy = VD->getType().getCanonicalType(); in SuggestInitializationFixit()
437 !VD->hasAttr<BlocksAttr>()) { in SuggestInitializationFixit()
438 S.Diag(VD->getLocation(), diag::note_block_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
439 << FixItHint::CreateInsertion(VD->getLocation(), "__block "); in SuggestInitializationFixit()
444 if (VD->getInit()) in SuggestInitializationFixit()
448 if (VD->getLocEnd().isMacroID()) in SuggestInitializationFixit()
451 SourceLocation Loc = S.PP.getLocForEndOfToken(VD->getLocEnd()); in SuggestInitializationFixit()
458 S.Diag(Loc, diag::note_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
492 static void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, in DiagUninitUse() argument
[all …]
HDSema.cpp361 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local
367 if (VD->isReferenced() && in ShouldRemoveFromUnused()
368 VD->isUsableInConstantExpressions(SemaRef->Context)) in ShouldRemoveFromUnused()
373 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused()
379 DeclToCheck = VD->getMostRecentDecl(); in ShouldRemoveFromUnused()
380 if (DeclToCheck != VD) in ShouldRemoveFromUnused()
697 VarDecl *VD = (*T)->getActingDefinition(); in ActOnEndOfTranslationUnit() local
702 if (VD == 0 || VD->isInvalidDecl() || !Seen.insert(VD)) in ActOnEndOfTranslationUnit()
706 = Context.getAsIncompleteArrayType(VD->getType())) { in ActOnEndOfTranslationUnit()
708 Diag(VD->getLocation(), diag::warn_tentative_incomplete_array); in ActOnEndOfTranslationUnit()
[all …]
HDJumpDiagnostics.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()
206 VD->getInit() == Init && VD->getInitStyle() == VarDecl::CallInit) { in GetDiagForGotoScopeDecl()
246 if (VarDecl *VD = dyn_cast<VarDecl>(D)) in BuildScopeInformation() local
[all …]
HDScopeInfo.cpp187 void LambdaScopeInfo::getPotentialVariableCapture(unsigned Idx, VarDecl *&VD, Expr *&E) { in getPotentialVariableCapture() argument
193 VD = dyn_cast<VarDecl>(DRE->getFoundDecl()); in getPotentialVariableCapture()
195 VD = dyn_cast<VarDecl>(ME->getMemberDecl()); in getPotentialVariableCapture()
199 assert(VD); in getPotentialVariableCapture()
HDTargetAttributesSema.cpp133 ValueDecl *VD = dyn_cast<ValueDecl>(D); in HandleX86ForceAlignArgPointerAttr() local
134 if (VD && VD->getType()->isFunctionPointerType()) in HandleX86ForceAlignArgPointerAttr()
162 if (VarDecl *VD = dyn_cast<VarDecl>(D)) { in mergeDLLImportAttr() local
163 if (VD->hasDefinition()) { in mergeDLLImportAttr()
/trueos/contrib/llvm/tools/clang/lib/Analysis/
HDPseudoConstantAnalysis.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 …]
HDUninitializedValues.cpp295 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() local
296 if (isTrackedVar(VD, DC)) in findVar()
297 return FindVarResult(VD, DRE); in findVar()
317 bool isTrackedVar(const VarDecl *VD) const { in isTrackedVar()
318 return ::isTrackedVar(VD, DC); in isTrackedVar()
340 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() local
341 if (!VD || !isTrackedVar(VD)) in get()
349 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr() argument
350 if (Expr *Init = VD->getInit()) { in getSelfInitExpr()
352 = dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init)); in getSelfInitExpr()
[all …]
HDLiveVariables.cpp306 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { in Visit() local
307 for (const VariableArrayType* VA = FindVA(VD->getType()); in Visit()
357 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitBinaryOperator() local
359 if (VD->getType()->isReferenceType()) in VisitBinaryOperator()
362 if (!isAlwaysAlive(VD)) { in VisitBinaryOperator()
364 val.liveDecls = LV.DSetFact.remove(val.liveDecls, VD); in VisitBinaryOperator()
378 const VarDecl *VD = *I; in VisitBlockExpr() local
379 if (isAlwaysAlive(VD)) in VisitBlockExpr()
381 val.liveDecls = LV.DSetFact.add(val.liveDecls, VD); in VisitBlockExpr()
394 if (VarDecl *VD = dyn_cast<VarDecl>(*DI)) { in VisitDeclStmt() local
[all …]
HDAnalysisDeclContext.cpp131 const VarDecl *VD = it->getVariable(); in getSelfDecl() local
132 if (VD->getName() == "self") in getSelfDecl()
133 return dyn_cast<ImplicitParamDecl>(VD); in getSelfDecl()
457 bool IsTrackedDecl(const VarDecl *VD) { in IsTrackedDecl() argument
458 const DeclContext *DC = VD->getDeclContext(); in IsTrackedDecl()
470 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitDeclRefExpr() local
471 if (!VD->hasLocalStorage()) { in VisitDeclRefExpr()
472 if (Visited.insert(VD)) in VisitDeclRefExpr()
473 BEVals.push_back(VD, BC); in VisitDeclRefExpr()
HDCFG.cpp36 if (VarDecl *VD = dyn_cast<VarDecl>(D)) in GetEndLoc() local
37 if (Expr *Ex = VD->getInit()) in GetEndLoc()
185 void addVar(VarDecl *VD) { in addVar() argument
186 Vars.push_back(VD, ctx); in addVar()
446 LocalScope* addLocalScopeForVarDecl(VarDecl *VD, LocalScope* Scope = NULL);
471 void appendAutomaticObjDtor(CFGBlock *B, VarDecl *VD, Stmt *S) { in appendAutomaticObjDtor() argument
472 B->appendAutomaticObjDtor(VD, S, cfg->getBumpVectorContext()); in appendAutomaticObjDtor()
957 if (VarDecl *VD = dyn_cast<VarDecl>(*DI)) in addLocalScopeForDeclStmt() local
958 Scope = addLocalScopeForVarDecl(VD, Scope); in addLocalScopeForDeclStmt()
966 LocalScope* CFGBuilder::addLocalScopeForVarDecl(VarDecl *VD, in addLocalScopeForVarDecl() argument
[all …]
/trueos/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/
HDDeadStoresChecker.cpp205 void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val, in CheckVarDecl() argument
209 if (!VD->hasLocalStorage()) in CheckVarDecl()
213 if (VD->getType()->getAs<ReferenceType>()) in CheckVarDecl()
216 if (!isLive(Live, VD) && in CheckVarDecl()
217 !(VD->getAttr<UnusedAttr>() || VD->getAttr<BlocksAttr>())) { in CheckVarDecl()
221 Report(VD, dsk, ExLoc, Val->getSourceRange()); in CheckVarDecl()
227 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef() local
228 CheckVarDecl(VD, DR, Val, dsk, Live); in CheckDeclRef()
231 bool isIncrement(VarDecl *VD, const BinaryOperator* B) { in isIncrement() argument
244 if (DR->getDecl() == VD) in isIncrement()
[all …]
HDUndefCapturedBlockVarChecker.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()
HDIdempotentOperationChecker.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()
701 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()); in isConstantOrPseudoConstant() local
[all …]
HDLLVMConventionsChecker.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()
HDVLASizeChecker.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()
/trueos/contrib/llvm/tools/clang/lib/AST/
HDStmtIterator.cpp44 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) in NextVA() local
45 if (VD->Init) in NextVA()
71 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { in HandleDecl() local
72 if (const VariableArrayType* VAPtr = FindVA(VD->getType().getTypePtr())) { in HandleDecl()
77 if (VD->getInit()) in HandleDecl()
112 VarDecl* VD = cast<VarDecl>(*DGI); in GetDeclExpr() local
113 return *VD->getInitAddress(); in GetDeclExpr()
HDAPValue.cpp403 if (const ValueDecl *VD = Base.dyn_cast<const ValueDecl*>()) in printPretty() local
404 Out << *VD; in printPretty()
422 if (const ValueDecl *VD = Base.dyn_cast<const ValueDecl*>()) { in printPretty() local
423 Out << *VD; in printPretty()
424 ElemTy = VD->getType(); in printPretty()
443 const ValueDecl *VD = cast<ValueDecl>(BaseOrMember); in printPretty() local
447 Out << *VD; in printPretty()
448 ElemTy = VD->getType(); in printPretty()
524 if (const ValueDecl *VD = getMemberPointerDecl()) { in printPretty() local
525 Out << '&' << *cast<CXXRecordDecl>(VD->getDeclContext()) << "::" << *VD; in printPretty()
/trueos/contrib/binutils/opcodes/
HDppc-opc.c489 #define VD VC + 1 macro
490 #define VS VD
494 #define SIMM VD + 1
1800 { "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
1837 { "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
1838 { "vaddfp", VX(4, 10), VX_MASK, PPCVEC, { VD, VA, VB } },
1839 { "vaddsbs", VX(4, 768), VX_MASK, PPCVEC, { VD, VA, VB } },
1840 { "vaddshs", VX(4, 832), VX_MASK, PPCVEC, { VD, VA, VB } },
1841 { "vaddsws", VX(4, 896), VX_MASK, PPCVEC, { VD, VA, VB } },
1842 { "vaddubm", VX(4, 0), VX_MASK, PPCVEC, { VD, VA, VB } },
[all …]
/trueos/contrib/llvm/tools/clang/lib/ARCMigrate/
HDTransAutoreleasePool.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()
/trueos/contrib/llvm/tools/clang/lib/Rewrite/Frontend/
HDRewriteObjC.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 …]
/trueos/contrib/llvm/patches/
HDpatch-r278788-clang-r201130-pch-miscompilation.diff23 VD->setCachedLinkage(VarLinkage);
27 + if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage &&
28 VD->getLexicalDeclContext()->isFunctionOrMethod())
29 VD->setLocalExternDecl();
/trueos/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/
HDPseudoConstantAnalysis.h28 bool isPseudoConstant(const VarDecl *VD);
29 bool wasReferenced(const VarDecl *VD);
/trueos/contrib/llvm/tools/clang/lib/CodeGen/
HDCGDebugInfo.cpp1233 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) in CollectTemplateParams() local
1234 V = CGM.GetAddrOfGlobalVar(VD); in CollectTemplateParams()
2627 llvm::DIType CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD, in EmitTypeForVarWithBlocksAttr() argument
2635 llvm::DIFile Unit = getOrCreateFile(VD->getLocation()); in EmitTypeForVarWithBlocksAttr()
2636 QualType Type = VD->getType(); in EmitTypeForVarWithBlocksAttr()
2646 bool HasCopyAndDispose = CGM.getContext().BlockRequiresCopying(Type, VD); in EmitTypeForVarWithBlocksAttr()
2665 CharUnits Align = CGM.getContext().getDeclAlign(VD); in EmitTypeForVarWithBlocksAttr()
2689 FieldTy = DBuilder.createMemberType(Unit, VD->getName(), Unit, in EmitTypeForVarWithBlocksAttr()
2704 void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag, in EmitDeclare() argument
2711 VD->isImplicit() || (isa<Decl>(VD->getDeclContext()) && in EmitDeclare()
[all …]
HDCGExpr.cpp214 const ValueDecl *VD = M->getExtendingDecl(); in pushTemporaryCleanup() local
216 VD && isa<VarDecl>(VD) && VD->hasAttr<ObjCPreciseLifetimeAttr>(); in pushTemporaryCleanup()
1612 if (const VarDecl *VD = dyn_cast<VarDecl>(Exp->getDecl())) { in setObjCGCLValueClass() local
1613 if (VD->hasGlobalStorage()) { in setObjCGCLValueClass()
1615 LV.setThreadLocalRef(VD->getTLSKind() != VarDecl::TLS_None); in setObjCGCLValueClass()
1692 const Expr *E, const VarDecl *VD) { in EmitGlobalVarDeclLValue() argument
1693 llvm::Value *V = CGF.CGM.GetAddrOfGlobalVar(VD); in EmitGlobalVarDeclLValue()
1694 llvm::Type *RealVarTy = CGF.getTypes().ConvertTypeForMem(VD->getType()); in EmitGlobalVarDeclLValue()
1696 CharUnits Alignment = CGF.getContext().getDeclAlign(VD); in EmitGlobalVarDeclLValue()
1699 if (VD->getType()->isReferenceType()) { in EmitGlobalVarDeclLValue()
[all …]

12345