/external/clang/lib/StaticAnalyzer/Checkers/ |
D | UndefBranchChecker.cpp | 36 const Expr *FindExpr(const Expr *Ex) { in FindExpr() 37 if (!MatchesCriteria(Ex)) in FindExpr() 40 for (Stmt::const_child_iterator I = Ex->child_begin(), in FindExpr() 41 E = Ex->child_end();I!=E;++I) in FindExpr() 47 return Ex; in FindExpr() 50 bool MatchesCriteria(const Expr *Ex) { in MatchesCriteria() 51 return St->getSVal(Ex, LCtx).isUndef(); in MatchesCriteria() 88 const Expr *Ex = cast<Expr>(Condition); in checkBranchCondition() local 94 if (PS->getStmt() == Ex) in checkBranchCondition() 98 Ex = FindIt.FindExpr(Ex); in checkBranchCondition() [all …]
|
D | UndefResultChecker.cpp | 52 const Expr *Ex = NULL; in checkPostStmt() local 56 Ex = B->getLHS()->IgnoreParenCasts(); in checkPostStmt() 60 Ex = B->getRHS()->IgnoreParenCasts(); in checkPostStmt() 64 if (Ex) { in checkPostStmt() 77 if (Ex) { in checkPostStmt() 78 report->addRange(Ex->getSourceRange()); in checkPostStmt() 79 report->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(N, Ex, in checkPostStmt()
|
D | DereferenceChecker.cpp | 39 const Expr *Ex, const ProgramState *state, 48 const Expr *Ex, in AddDerefSource() argument 52 Ex = Ex->IgnoreParenLValueCasts(); in AddDerefSource() 54 switch (Ex->getStmtClass()) { in AddDerefSource() 58 const DeclRefExpr *DR = cast<DeclRefExpr>(Ex); in AddDerefSource() 68 const MemberExpr *ME = cast<MemberExpr>(Ex); in AddDerefSource()
|
D | ObjCAtSyncChecker.cpp | 41 const Expr *Ex = S->getSynchExpr(); in checkPreStmt() local 43 SVal V = state->getSVal(Ex, C.getLocationContext()); in checkPreStmt() 53 report->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(N, Ex, in checkPreStmt() 77 report->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(N, Ex, in checkPreStmt()
|
D | DeadStoresChecker.cpp | 71 static const Expr *LookThroughTransitiveAssignments(const Expr *Ex) { in LookThroughTransitiveAssignments() argument 72 while (Ex) { in LookThroughTransitiveAssignments() 74 dyn_cast<BinaryOperator>(Ex->IgnoreParenCasts()); in LookThroughTransitiveAssignments() 78 Ex = BO->getRHS(); in LookThroughTransitiveAssignments() 83 return Ex; in LookThroughTransitiveAssignments() 151 void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val, in CheckVarDecl() argument 166 PathDiagnosticLocation::createBegin(Ex, BR.getSourceManager(), AC); in CheckVarDecl() 249 const Expr *Ex = U->getSubExpr()->IgnoreParenCasts(); in observeStmt() local 251 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex)) in observeStmt()
|
D | IdempotentOperationChecker.cpp | 92 static bool CanVary(const Expr *Ex, 618 bool IdempotentOperationChecker::CanVary(const Expr *Ex, in CanVary() argument 621 Ex = Ex->IgnoreParenCasts(); in CanVary() 623 if (Ex->getLocStart().isMacroID()) in CanVary() 626 switch (Ex->getStmtClass()) { in CanVary() 658 cast<const UnaryExprOrTypeTraitExpr>(Ex); in CanVary() 665 return !isConstantOrPseudoConstant(cast<DeclRefExpr>(Ex), AC); in CanVary() 669 const BinaryOperator *B = cast<const BinaryOperator>(Ex); in CanVary() 681 const UnaryOperator *U = cast<const UnaryOperator>(Ex); in CanVary() 691 return CanVary(cast<const ChooseExpr>(Ex)->getChosenSubExpr( in CanVary() [all …]
|
D | UndefCapturedBlockVarChecker.cpp | 94 if (const Expr *Ex = FindBlockDeclRefExpr(BE->getBody(), VD)) in checkPostStmt() local 95 R->addRange(Ex->getSourceRange()); in checkPostStmt()
|
D | ObjCUnusedIVarsChecker.cpp | 36 if (const ObjCIvarRefExpr *Ex = dyn_cast<ObjCIvarRefExpr>(S)) { in Scan() local 37 const ObjCIvarDecl *D = Ex->getDecl(); in Scan()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | ExprEngineC.cpp | 180 void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, in VisitCast() argument 192 evalLoad(Dst, CastE, CastE, subExprNode, state, state->getSVal(Ex, LCtx)); in VisitCast() 199 QualType ExTy = Ex->getType(); in VisitCast() 233 SVal V = state->getSVal(Ex, LCtx); in VisitCast() 269 SVal V = state->getSVal(Ex, LCtx); in VisitCast() 280 SVal val = state->getSVal(Ex, LCtx); in VisitCast() 290 SVal val = state->getSVal(Ex, LCtx); in VisitCast() 450 const Expr *Ex = (const Expr*) cast<UndefinedVal>(X).getData(); in VisitLogicalExpr() local 451 assert(Ex); in VisitLogicalExpr() 453 if (Ex == B->getRHS()) { in VisitLogicalExpr() [all …]
|
D | BugReporterVisitors.cpp | 314 const Expr *Ex = dyn_cast<Expr>(S); in getTrackNullOrUndefValueVisitor() local 315 if (Ex) { in getTrackNullOrUndefValueVisitor() 316 Ex = Ex->IgnoreParenLValueCasts(); in getTrackNullOrUndefValueVisitor() 317 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex)) { in getTrackNullOrUndefValueVisitor() 530 const Expr *Ex = Cond; in VisitTrueTest() local 533 Ex = Ex->IgnoreParens(); in VisitTrueTest() 534 switch (Ex->getStmtClass()) { in VisitTrueTest() 538 return VisitTrueTest(Cond, cast<BinaryOperator>(Ex), tookTrue, BRC, in VisitTrueTest() 541 return VisitTrueTest(Cond, cast<DeclRefExpr>(Ex), tookTrue, BRC, in VisitTrueTest() 544 const UnaryOperator *UO = cast<UnaryOperator>(Ex); in VisitTrueTest() [all …]
|
D | ExprEngine.cpp | 474 if (const Expr *Ex = dyn_cast<Expr>(S)) in Visit() local 475 S = Ex->IgnoreParens(); in Visit() 647 const Expr *Ex = cast<Expr>(S); in Visit() local 648 QualType resultType = Ex->getType(); in Visit() 651 svalBuilder.getConjuredSymbolVal(0, Ex, LCtx, resultType, in Visit() 653 ProgramStateRef state = N->getState()->BindExpr(Ex, LCtx, result); in Visit() 1098 const Expr *Ex = (Op == BO_LAnd && branchTaken) || in MarkBranch() local 1102 return state->BindExpr(B, LCtx, UndefinedVal(Ex)); in MarkBranch() 1113 const Expr *Ex; in MarkBranch() local 1116 Ex = C->getTrueExpr(); in MarkBranch() [all …]
|
D | ExprEngineObjC.cpp | 22 void ExprEngine::VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr *Ex, in VisitLvalObjCIvarRefExpr() argument 27 SVal baseVal = state->getSVal(Ex->getBase(), LCtx); in VisitLvalObjCIvarRefExpr() 28 SVal location = state->getLValue(Ex->getDecl(), baseVal); in VisitLvalObjCIvarRefExpr() 32 Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, location)); in VisitLvalObjCIvarRefExpr() 36 getCheckerManager().runCheckersForPostStmt(Dst, dstIvar, Ex, *this); in VisitLvalObjCIvarRefExpr()
|
D | MemRegion.cpp | 274 const Expr *Ex, unsigned cnt, in ProfileRegion() argument 277 ID.AddPointer(Ex); in ProfileRegion() 282 ProfileRegion(ID, Ex, Cnt, superRegion); in Profile() 392 Expr const *Ex, in ProfileRegion() argument 394 ID.AddPointer(Ex); in ProfileRegion() 399 ProfileRegion(ID, Ex, getSuperRegion()); in Profile() 447 os << "alloca{" << (void*) Ex << ',' << Cnt << '}'; in dumpToStream() 469 << (void*) Ex << '}'; in dumpToStream()
|
D | RegionStore.cpp | 250 const Expr *Ex, 607 const Expr *Ex; member in __anon312556460511::invalidateRegionsWorker 622 Ex(ex), Count(count), LCtx(lctx), IS(is), Regions(r) {} in invalidateRegionsWorker() 698 svalBuilder.getConjuredSymbolVal(baseR, Ex, LCtx, Ctx.IntTy, Count); in VisitBaseRegion() 714 svalBuilder.getConjuredSymbolVal(baseR, Ex, LCtx, Ctx.IntTy, Count); in VisitBaseRegion() 722 svalBuilder.getConjuredSymbolVal(baseR, Ex, LCtx, in VisitBaseRegion() 738 DefinedOrUnknownSVal V = svalBuilder.getConjuredSymbolVal(baseR, Ex, LCtx, in VisitBaseRegion() 745 const Expr *Ex, in invalidateGlobalRegion() argument 754 svalBuilder.getConjuredSymbolVal(/* SymbolTag = */ (void*) GS, Ex, LCtx, in invalidateGlobalRegion() 771 const Expr *Ex, unsigned Count, in invalidateRegions() argument [all …]
|
D | Environment.cpp | 48 if (const Expr *Ex = dyn_cast<Expr>(E)) in getSVal() local 49 E = Ex->IgnoreParens(); in getSVal()
|
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | ExprEngine.h | 262 void VisitLvalArraySubscriptExpr(const ArraySubscriptExpr *Ex, 283 void VisitCast(const CastExpr *CastE, const Expr *Ex, ExplodedNode *Pred, 299 void VisitGuardedExpr(const Expr *Ex, const Expr *L, const Expr *R, 334 void VisitOffsetOfExpr(const OffsetOfExpr *Ex, ExplodedNode *Pred, 338 void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Ex, 388 const Expr *Ex);
|
D | MemRegion.h | 410 const Expr *Ex; variable 413 : SubRegion(superRegion, AllocaRegionKind), Cnt(cnt), Ex(ex) {} in AllocaRegion() 417 const Expr *getExpr() const { return Ex; } in getExpr() 425 static void ProfileRegion(llvm::FoldingSetNodeID& ID, const Expr *Ex, 973 Expr const *Ex; variable 976 : TypedValueRegion(sReg, CXXTempObjectRegionKind), Ex(E) {} in CXXTempObjectRegion() 982 const Expr *getExpr() const { return Ex; } in getExpr() 985 return Ex->getType(); in getValueType() 1095 const AllocaRegion *getAllocaRegion(const Expr *Ex, unsigned Cnt, 1155 const CXXTempObjectRegion *getCXXTempObjectRegion(Expr const *Ex,
|
D | ProgramState.h | 251 SVal getSValAsScalarOrLoc(const Stmt *Ex, const LocationContext *LCtx) const; 663 inline SVal ProgramState::getSVal(const Stmt *Ex, const LocationContext *LCtx, in getSVal() argument 665 return Env.getSVal(EnvironmentEntry(Ex, LCtx), in getSVal() 673 if (const Expr *Ex = dyn_cast<Expr>(S)) { in getSValAsScalarOrLoc() local 674 QualType T = Ex->getType(); in getSValAsScalarOrLoc() 675 if (Ex->isLValue() || Loc::isLocType(T) || T->isIntegerType()) in getSValAsScalarOrLoc()
|
D | ObjCMessage.h | 86 if (const Expr *Ex = getInstanceReceiver()) in getInstanceReceiverSVal() local 87 return State->getSValAsScalarOrLoc(Ex, LC); in getInstanceReceiverSVal()
|
/external/clang/lib/Analysis/ |
D | UninitializedValues.cpp | 387 static const Expr *stripCasts(ASTContext &C, const Expr *Ex) { in stripCasts() argument 388 while (Ex) { in stripCasts() 389 Ex = Ex->IgnoreParenNoopCasts(C); in stripCasts() 390 if (const CastExpr *CE = dyn_cast<CastExpr>(Ex)) { in stripCasts() 392 Ex = CE->getSubExpr(); in stripCasts() 398 return Ex; in stripCasts()
|
D | PseudoConstantAnalysis.cpp | 87 if (const Expr *Ex = dyn_cast<Expr>(Head)) in RunAnalysis() local 88 Head = Ex->IgnoreParenCasts(); in RunAnalysis()
|
D | ReachableCode.cpp | 186 if (const Expr *Ex = dyn_cast<Expr>(S)) in GetUnreachableLoc() local 187 S = Ex->IgnoreParenImpCasts(); in GetUnreachableLoc()
|
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/ |
D | p3-0x.cpp | 34 void g() throw (struct Ex {}) { // expected-error {{'Ex' can not be defined in a type specifier}} in g()
|
/external/clang/lib/Sema/ |
D | SemaExprCXX.cpp | 505 Sema::ActOnCXXThrow(Scope *S, SourceLocation OpLoc, Expr *Ex) { in ActOnCXXThrow() argument 507 if (Ex) { in ActOnCXXThrow() 519 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Ex->IgnoreParens())) in ActOnCXXThrow() 538 return BuildCXXThrow(OpLoc, Ex, IsThrownVarInScope); in ActOnCXXThrow() 541 ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, in BuildCXXThrow() argument 548 if (Ex && !Ex->isTypeDependent()) { in BuildCXXThrow() 549 ExprResult ExRes = CheckCXXThrowOperand(OpLoc, Ex, IsThrownVarInScope); in BuildCXXThrow() 552 Ex = ExRes.take(); in BuildCXXThrow() 555 return Owned(new (Context) CXXThrowExpr(Ex, Context.VoidTy, OpLoc, in BuildCXXThrow() 2004 ExprResult Ex = Owned(ExE); in ActOnCXXDelete() local [all …]
|
D | SemaChecking.cpp | 2369 const Expr *Ex = getDataArg(argIndex); in HandlePrintfSpecifier() local 2372 if (ATR.isValid() && !ATR.matchesType(S.Context, Ex->getType())) { in HandlePrintfSpecifier() 2376 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Ex)) in HandlePrintfSpecifier() 2379 Ex = ICE->getSubExpr(); in HandlePrintfSpecifier() 2380 if (ATR.matchesType(S.Context, Ex->getType())) in HandlePrintfSpecifier() 2386 bool success = fixedFS.fixType(Ex->getType(), S.getLangOpts(), in HandlePrintfSpecifier() 2397 << ATR.getRepresentativeTypeName(S.Context) << Ex->getType() in HandlePrintfSpecifier() 2398 << Ex->getSourceRange(), in HandlePrintfSpecifier() 2409 << ATR.getRepresentativeTypeName(S.Context) << Ex->getType() in HandlePrintfSpecifier() 2411 << Ex->getSourceRange(), in HandlePrintfSpecifier() [all …]
|