[cfe-commits] r85092 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Sun Oct 25 22:18:32 PDT 2009


Author: zhongxingxu
Date: Mon Oct 26 00:18:31 2009
New Revision: 85092

URL: http://llvm.org/viewvc/llvm-project?rev=85092&view=rev
Log:
'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.

Modified:
    cfe/trunk/lib/Analysis/GRExprEngine.cpp

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=85092&r1=85091&r2=85092&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Mon Oct 26 00:18:31 2009
@@ -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:





More information about the cfe-commits mailing list