'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
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 08e02fe..b146c55 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1454,17 +1454,10 @@
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: