aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-12-08 09:07:59 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-12-08 09:07:59 +0000
commit7c9624ba29bc700c3aa6c65c5363174a890c534e (patch)
tree9c455c03f747dbe614250923ca5b0b4ba19d0dee /lib/Analysis/GRExprEngine.cpp
parent604e7f14d672af80ca5b9044f30f3dc23d37ddd5 (diff)
Refactor builtin function evaluation into a checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90847 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 8f63128975..c9c419beaa 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -244,6 +244,7 @@ static void RegisterInternalChecks(GRExprEngine &Eng) {
// This is not a checker yet.
RegisterNoReturnFunctionChecker(Eng);
+ RegisterBuiltinFunctionChecker(Eng);
}
GRExprEngine::GRExprEngine(AnalysisManager &mgr)
@@ -1669,7 +1670,6 @@ void GRExprEngine::VisitCallRec(CallExpr* CE, ExplodedNode* Pred,
// Check for the "noreturn" attribute.
SaveAndRestore<bool> OldSink(Builder->BuildSinks);
- const FunctionDecl* FD = L.getAsFunctionDecl();
ExplodedNodeSet DstTmp3, DstChecker, DstOther;
@@ -1677,12 +1677,6 @@ void GRExprEngine::VisitCallRec(CallExpr* CE, ExplodedNode* Pred,
if (CheckerEvalCall(CE, DstChecker, *DI))
DstTmp3 = DstChecker;
else {
- //MarkNoReturnFunction(FD, CE, state, Builder);
-
- // Evaluate the call.
- if (EvalBuiltinFunction(FD, CE, *DI, Dst))
- continue;
-
// Dispatch to the plug-in transfer function.
SaveOr OldHasGen(Builder->HasGeneratedNode);
Pred = *DI;
@@ -1691,7 +1685,6 @@ void GRExprEngine::VisitCallRec(CallExpr* CE, ExplodedNode* Pred,
// FIXME: Allow us to chain together transfer functions.
assert(Builder && "GRStmtNodeBuilder must be defined.");
-
if (!EvalOSAtomic(DstOther, *this, *Builder, CE, L, Pred))
getTF().EvalCall(DstOther, *this, *Builder, CE, L, Pred);