aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2011-08-28 05:54:23 +0000
committerJordy Rose <jediknil@belkadan.com>2011-08-28 05:54:23 +0000
commitfe27971d54d26997149d6b84057f04ff398d1d5d (patch)
tree45a9607174a346eb6c8baf2fa92ebd869b2cc302 /lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
parente38dd95dddb8f1b38469c8d0e28aa1c660489324 (diff)
[analyzer] Eliminate almost all uses of TransferFuncs from ExprEngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineObjC.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineObjC.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp b/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
index a80b2bfb7e..1a68657cf9 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
@@ -142,7 +142,6 @@ void ExprEngine::VisitObjCMessage(const ObjCMessage &msg,
ExplodedNode *Pred = *DI;
bool RaisesException = false;
- unsigned oldSize = dstEval.size();
SaveAndRestore<bool> OldSink(Builder->BuildSinks);
SaveOr OldHasGen(Builder->hasGeneratedNode);
@@ -225,12 +224,8 @@ void ExprEngine::VisitObjCMessage(const ObjCMessage &msg,
// Dispatch to plug-in transfer function.
evalObjCMessage(dstEval, msg, Pred, Pred->getState());
}
-
- // Handle the case where no nodes where generated. Auto-generate that
- // contains the updated state if we aren't generating sinks.
- if (!Builder->BuildSinks && dstEval.size() == oldSize &&
- !Builder->hasGeneratedNode)
- MakeNode(dstEval, msg.getOriginExpr(), Pred, Pred->getState());
+
+ assert(Builder->BuildSinks || Builder->hasGeneratedNode);
}
// Finally, perform the post-condition check of the ObjCMessageExpr and store
@@ -276,9 +271,8 @@ void ExprEngine::evalObjCMessage(ExplodedNodeSet &Dst, const ObjCMessage &msg,
// Invalidate the arguments (and the receiver)
const LocationContext *LC = Pred->getLocationContext();
state = invalidateArguments(state, CallOrObjCMessage(msg, state), LC);
- Builder->MakeNode(Dst, msg.getOriginExpr(), Pred, state);
- // Now we can handle the other aspects of the message.
- //getTF().evalObjCMessage(Dst, *this, *Builder, msg, Pred, state);
+ // And create the new node.
+ MakeNode(Dst, msg.getOriginExpr(), Pred, state);
}