diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-20 18:43:42 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-20 18:43:42 +0000 |
commit | 4b4613cbeccd9810be91ad2d52005b8862530633 (patch) | |
tree | 4d45cccd19ae9e8c3983926ab35a1f32c79c2735 /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | |
parent | 10ff96ce8c3307454bef4dbfdaeefde5a34bc7cf (diff) | |
download | bcm5719-llvm-4b4613cbeccd9810be91ad2d52005b8862530633.tar.gz bcm5719-llvm-4b4613cbeccd9810be91ad2d52005b8862530633.zip |
[analyzer] Replace boolean IsSink parameters with 'generateSink' methods.
Generating a sink is significantly different behavior from generating a
normal node, and a simple boolean parameter can be rather opaque. Per
offline discussion with Anna, adding new generation methods is the
clearest way to communicate intent.
No functionality change.
llvm-svn: 162215
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 3e14765875d..2895e26da3e 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -211,8 +211,7 @@ void ExprEngine::VisitBlockExpr(const BlockExpr *BE, ExplodedNode *Pred, StmtNodeBuilder Bldr(Pred, Tmp, *currentBuilderContext); Bldr.generateNode(BE, Pred, State->BindExpr(BE, Pred->getLocationContext(), V), - false, 0, - ProgramPoint::PostLValueKind); + 0, ProgramPoint::PostLValueKind); // FIXME: Move all post/pre visits to ::Visit(). getCheckerManager().runCheckersForPostStmt(Dst, Tmp, BE, *this); @@ -347,7 +346,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, if (T->isReferenceType()) { // A bad_cast exception is thrown if input value is a reference. // Currently, we model this, by generating a sink. - Bldr.generateNode(CastE, Pred, state, true); + Bldr.generateSink(CastE, Pred, state); continue; } else { // If the cast fails on a pointer, bind to 0. |