aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-10-26 05:18:31 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-10-26 05:18:31 +0000
commit99f3b7902f39a71bd6759f39bbd072258b488092 (patch)
treecca04be6dac51f6c8f6a3c32ca1406e18cc62dd8 /lib/Analysis/GRExprEngine.cpp
parent9f8eb2032030482b1d3de86e9bee725d93564302 (diff)
'error' is usually used as a noreturn function. This can suppress some false
warnings. Eventually we need a way to import externally defined functions summaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 08e02feb08..b146c55d89 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1454,17 +1454,10 @@ static void MarkNoReturnFunction(const FunctionDecl *FD, CallExpr *CE,
break;
case 5:
- if (!memcmp(s, "panic", 5)) Builder->BuildSinks = true;
- else if (!memcmp(s, "error", 5)) {
- if (CE->getNumArgs() > 0) {
- SVal X = state->getSVal(*CE->arg_begin());
- // FIXME: use Assume to inspect the possible symbolic value of
- // X. Also check the specific signature of error().
- nonloc::ConcreteInt* CI = dyn_cast<nonloc::ConcreteInt>(&X);
- if (CI && CI->getValue() != 0)
- Builder->BuildSinks = true;
- }
- }
+ if (!memcmp(s, "panic", 5))
+ Builder->BuildSinks = true;
+ else if (!memcmp(s, "error", 5))
+ Builder->BuildSinks = true;
break;
case 6: