]> granicus.if.org Git - clang/commitdiff
Added a function call case that generates sink nodes.
authorZhongxing Xu <xuzhongxing@gmail.com>
Tue, 7 Oct 2008 10:06:03 +0000 (10:06 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Tue, 7 Oct 2008 10:06:03 +0000 (10:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57240 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index 1c3a170a5686c6ece53c341ade931689ad31ccba..a6b501372f381c17cfff364d6f65b76da5bcbe2e 100644 (file)
@@ -1131,6 +1131,12 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
 
           case 5:
             if (!memcmp(s, "panic", 5)) Builder->BuildSinks = true;
+            else if (!memcmp(s, "error", 5)) {
+              Expr* Arg = *CE->arg_begin();
+              if (IntegerLiteral* IL = dyn_cast<IntegerLiteral>(Arg))
+                if (IL->getValue() != 0)
+                  Builder->BuildSinks = true;
+            }
             break;
           
           case 6: