diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-12-08 09:07:59 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-12-08 09:07:59 +0000 |
| commit | fe2f901269a9744aaece1b6c322b86223aa2b0d6 (patch) | |
| tree | 4df78ea1fcb487e00fa9fa6e3992831bbc4101cd /clang/lib/Analysis/GRExprEngine.cpp | |
| parent | 3969e30d38317ca1e02845d81c6da2efc078b038 (diff) | |
| download | bcm5719-llvm-fe2f901269a9744aaece1b6c322b86223aa2b0d6.tar.gz bcm5719-llvm-fe2f901269a9744aaece1b6c322b86223aa2b0d6.zip | |
Refactor builtin function evaluation into a checker.
llvm-svn: 90847
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
| -rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 8f631289754..c9c419beaa0 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/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); |

