diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-01-11 23:36:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-01-11 23:36:25 +0000 |
commit | 9195caf28f2a5dcef1e299bf3e5232a018ca1c68 (patch) | |
tree | c36c713b7891612c464849fa3afa258ae14bf431 /lib/StaticAnalyzer/Core/ExprEngineC.cpp | |
parent | 2246823e207a4846c842a27cf99d99920cd2b178 (diff) |
Refine analyzer's handling of unary '!' and floating types to not assert.
Fixes PR 14634 and <rdar://problem/12903080>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngineC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 1253f8888c..f1ef0f6601 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/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()); |