/external/clang/include/clang/Analysis/Analyses/ |
PseudoConstantAnalysis.h | 28 bool isPseudoConstant(const VarDecl *VD); 29 bool wasReferenced(const VarDecl *VD);
|
/external/clang/lib/Analysis/ |
PseudoConstantAnalysis.cpp | 40 bool PseudoConstantAnalysis::isPseudoConstant(const VarDecl *VD) { 42 if (!VD->hasLocalStorage() && !VD->isStaticLocal()) 52 return !NonConstants->count(VD); 56 bool PseudoConstantAnalysis::wasReferenced(const VarDecl *VD) { 64 return UsedVars->count(VD); 125 const VarDecl *VD = dyn_cast<VarDecl>(LHSDecl); 127 if (VD) 128 NonConstants->insert(VD); 159 const VarDecl *VD = dyn_cast<VarDecl>(D) [all...] |
AnalysisContext.cpp | 318 bool IsTrackedDecl(const VarDecl *VD) { 319 const DeclContext *DC = VD->getDeclContext(); 331 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) 332 if (!VD->hasLocalStorage()) { 333 unsigned &flag = Visited[VD]; 336 BEVals.push_back(VD, BC); 342 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { 343 unsigned &flag = Visited[VD]; 346 if (IsTrackedDecl(VD)) 347 BEVals.push_back(VD, BC) [all...] |
/external/clang/lib/StaticAnalyzer/Checkers/ |
UndefCapturedBlockVarChecker.cpp | 36 const VarDecl *VD){ 38 if (BR->getDecl() == VD) 44 const BlockDeclRefExpr *BR = FindBlockDeclRefExpr(child, VD); 69 const VarDecl *VD = VR->getDecl(); 71 if (VD->getAttr<BlocksAttr>() || !VD->hasLocalStorage()) 74 // Get the VarRegion associated with VD in the local stack frame. 76 VR = C.getSValBuilder().getRegionManager().getVarRegion(VD, LC); 88 os << "Variable '" << VD->getName() 92 if (const Expr *Ex = FindBlockDeclRefExpr(BE->getBody(), VD)) [all...] |
DeadStoresChecker.cpp | 138 void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val, 142 if (!VD->hasLocalStorage()) 146 if (VD->getType()->getAs<ReferenceType>()) 149 if (!Live.isLive(VD) && 150 !(VD->getAttr<UnusedAttr>() || VD->getAttr<BlocksAttr>())) { 154 Report(VD, dsk, ExLoc, Val->getSourceRange()); 160 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) 161 CheckVarDecl(VD, DR, Val, dsk, Live); 164 bool isIncrement(VarDecl *VD, const BinaryOperator* B) [all...] |
VLASizeChecker.cpp | 41 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); 42 if (!VD) 46 const VariableArrayType *VLA = Ctx.getAsVariableArrayType(VD->getType()); 122 state->getRegion(VD, LC)->getExtent(svalBuilder);
|
UndefinedAssignmentChecker.cpp | 71 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); 72 ex = VD->getInit();
|
IdempotentOperationChecker.cpp | 473 const VarDecl *VD = dyn_cast<VarDecl>(LHS_DR->getDecl()); 474 if (!VD) 481 if (VD != RHS_DR->getDecl()) 498 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()); 499 if (!VD) 502 if (AC->getPseudoConstantAnalysis()->wasReferenced(VD)) 517 const VarDecl *VD = dyn_cast<VarDecl>(LHS_DR->getDecl()); 518 if (!VD) 525 if (VD != RHS_DR->getDecl()) 711 const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()) [all...] |
LLVMConventionsChecker.cpp | 130 void VisitVarDecl(VarDecl *VD); 143 if (VarDecl *VD = dyn_cast<VarDecl>(*I)) 144 VisitVarDecl(VD); 147 void StringRefCheckerVisitor::VisitVarDecl(VarDecl *VD) { 148 Expr *Init = VD->getInit(); 154 if (!IsLLVMStringRef(VD->getType())) 179 PathDiagnosticLocation::createBegin(VD, BR.getSourceManager());
|
IteratorsChecker.cpp | 294 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); 295 if (!VD) 297 const MemRegion *IMR = state->getRegion(VD, LC); 319 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); 320 if (!VD) 322 const MemRegion *IMR = state->getRegion(VD, LC); 384 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl()); 385 if (!VD) 388 return state->getRegion(VD, LC); 521 const VarDecl *VD = dyn_cast<VarDecl>(D) [all...] |
/external/clang/lib/AST/ |
StmtIterator.cpp | 44 if (VarDecl* VD = dyn_cast<VarDecl>(decl)) 45 if (VD->Init) 51 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) 52 if (VD->Init) 92 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { 93 if (const VariableArrayType* VAPtr = FindVA(VD->getType().getTypePtr())) { 98 if (VD->getInit()) 142 VarDecl* VD = cast<VarDecl>(*DGI); 143 return *VD->getInitAddress(); 148 if (VarDecl* VD = dyn_cast<VarDecl>(decl)) [all...] |
/frameworks/compile/slang/ |
slang_rs_export_var.cpp | 30 const clang::VarDecl *VD, 33 mName(VD->getName().data(), VD->getName().size()), 37 const clang::Expr *Initializer = VD->getAnyInitializer(); 71 clang::QualType QT = VD->getTypeSourceInfo()->getType();
|
slang_rs_object_ref_count.h | 57 inline void addRSObject(clang::VarDecl* VD) { 58 mRSO.push_back(VD); 64 void AppendRSObjectInit(clang::VarDecl *VD, 71 static clang::Stmt *ClearRSObject(clang::VarDecl *VD, 91 // Return false if the type of variable declared in VD does not contain 93 static bool InitializeRSObject(clang::VarDecl *VD,
|
slang_rs_export_var.h | 47 const clang::VarDecl *VD,
|
slang_rs_context.cpp | 88 bool RSContext::processExportVar(const clang::VarDecl *VD) { 89 slangAssert(!VD->getName().empty() && "Variable name should not be empty"); 93 RSExportType *ET = RSExportType::CreateFromDecl(this, VD); 97 RSExportVar *EV = new RSExportVar(this, VD, ET); 203 clang::VarDecl *VD = (clang::VarDecl*) (*DI); 204 if (VD->getLinkage() == clang::ExternalLinkage) { 205 if (!processExportVar(VD)) {
|
slang_rs_export_type.cpp | 49 const clang::VarDecl *VD, 53 const clang::VarDecl *VD, 70 } else if (VD) { 72 clang::FullSourceLoc(VD->getLocation(), SM), 74 << VD->getName(); 84 const clang::VarDecl *VD, 89 ReportTypeError(DiagEngine, VD, TopLevelRecord, 99 ReportTypeError(DiagEngine, VD, TopLevelRecord, 105 ReportTypeError(DiagEngine, VD, TopLevelRecord, 111 if (TypeExportableHelper(ElementType, SPS, DiagEngine, VD, [all...] |
slang_rs_backend.cpp | 112 static bool ValidateVarDecl(clang::VarDecl *VD) { 113 if (!VD) { 117 clang::ASTContext &C = VD->getASTContext(); 118 const clang::Type *T = VD->getType().getTypePtr(); 121 if (VD->getLinkage() == clang::ExternalLinkage) { 123 if (!RSExportType::NormalizeType(T, TypeName, &C.getDiagnostics(), VD)) { 127 valid &= RSExportType::ValidateVarDecl(VD); 139 clang::VarDecl *VD = llvm::dyn_cast<clang::VarDecl>(*DI); 140 if (VD && !ValidateVarDecl(VD)) { [all...] |
/external/clang/test/CodeGenCXX/ |
mangle-alias-template.cpp | 20 Vec<double> VD; 21 g(VD);
|
/external/clang/test/SemaCXX/ |
destructor.cpp | 192 struct VD: VB {}; 226 VD vd; use(vd); local 255 VD* vd = new VD[4]; local 256 delete[] vd; 282 VB* vb = new VD(); 286 VD* vd = new VD() local [all...] |
/external/clang/lib/StaticAnalyzer/Core/ |
CheckerHelpers.cpp | 55 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) 56 if (VD->isStaticLocal())
|
/external/clang/include/clang/Analysis/Visitors/ |
CFGRecStmtDeclVisitor.h | 51 if (VarDecl *VD = dyn_cast<VarDecl>(D)) 52 if (Expr *I = VD->getInit())
|
/external/clang/lib/ARCMigrate/ |
TransAutoreleasePool.cpp | 171 if (VarDecl *VD = dyn_cast<VarDecl>(DclS->getSingleDecl())) { 172 if (isNSAutoreleasePool(VD->getType())) { 173 PoolVarInfo &info = PoolVars[VD]; 175 collectRefs(VD, S, info.Refs); 178 if (isPoolCreation(VD->getInit())) { 180 Scopes.back().PoolVar = VD; 189 if (VarDecl *VD = dyn_cast<VarDecl>(dref->getDecl())) { 192 if (isNSAutoreleasePool(VD->getType()) && 195 Scopes.back().PoolVar = VD;
|
TransBlockObjCVariable.cpp | 114 bool isAlreadyChecked(VarDecl *VD) { 115 return CheckedVars.count(VD);
|
/external/clang/lib/Sema/ |
JumpDiagnostics.cpp | 123 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { 125 if (VD->getType()->isVariablyModifiedType()) 128 if (VD->hasAttr<BlocksAttr>()) 132 if (VD->hasAttr<CleanupAttr>()) 136 if (Context.getLangOptions().ObjCAutoRefCount && VD->hasLocalStorage()) { 137 switch (VD->getType().getObjCLifetime()) { 150 if (Context.getLangOptions().CPlusPlus && VD->hasLocalStorage()) { 165 if (const Expr *init = VD->getInit()) { 188 } else if (VD->getType()->isArrayType()) { 189 record = VD->getType()->getBaseElementTypeUnsafe( [all...] |
Sema.cpp | 311 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { 314 const VarDecl *DeclToCheck = VD->getDefinition(); 320 DeclToCheck = VD->getMostRecentDeclaration(); 321 if (DeclToCheck != VD) 493 VarDecl *VD = (*T)->getActingDefinition(); 498 if (VD == 0 || VD->isInvalidDecl() || !Seen.insert(VD)) 502 = Context.getAsIncompleteArrayType(VD->getType())) { 503 if (RequireCompleteType(VD->getLocation() [all...] |