summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-01-11 23:36:25 +0000
committerTed Kremenek <kremenek@apple.com>2013-01-11 23:36:25 +0000
commit4e9a2dbde51fa5c6efc6dca4ee4d0296101ec676 (patch)
tree03f6cf1d9fcc6390021e40610a4f832324b73b00 /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent19dfc93912bf0196fb2dcf18644a511eaf7be869 (diff)
downloadbcm5719-llvm-4e9a2dbde51fa5c6efc6dca4ee4d0296101ec676.tar.gz
bcm5719-llvm-4e9a2dbde51fa5c6efc6dca4ee4d0296101ec676.zip
Refine analyzer's handling of unary '!' and floating types to not assert.
Fixes PR 14634 and <rdar://problem/12903080>. llvm-svn: 172274
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 1253f8888c7..f1ef0f66011 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -809,7 +809,10 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U,
Result = evalBinOp(state, BO_EQ, cast<Loc>(V), X,
U->getType());
}
- else {
+ else if (Ex->getType()->isFloatingType()) {
+ // FIXME: handle floating point types.
+ Result = UnknownVal();
+ } else {
nonloc::ConcreteInt X(getBasicVals().getValue(0, Ex->getType()));
Result = evalBinOp(state, BO_EQ, cast<NonLoc>(V), X,
U->getType());
OpenPOWER on IntegriCloud