diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-10-26 05:18:31 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-10-26 05:18:31 +0000 |
| commit | b7945461cbc05746184d85b8ac1f8a5c403d23d9 (patch) | |
| tree | b13a7f5d3fa9d5b9b0f7da22576d71a0241f7921 /clang | |
| parent | b81cb2a9a89e0c16000940adfa9420b0ea5d901a (diff) | |
| download | bcm5719-llvm-b7945461cbc05746184d85b8ac1f8a5c403d23d9.tar.gz bcm5719-llvm-b7945461cbc05746184d85b8ac1f8a5c403d23d9.zip | |
'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.
llvm-svn: 85092
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 08e02feb082..b146c55d893 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/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: |

