[cfe-commits] r108602 - in /cfe/trunk: lib/Checker/GRExprEngine.cpp test/Analysis/misc-ps.m
Ted Kremenek
kremenek at apple.com
Fri Jul 16 18:28:55 PDT 2010
Author: kremenek
Date: Fri Jul 16 20:28:55 2010
New Revision: 108602
URL: http://llvm.org/viewvc/llvm-project?rev=108602&view=rev
Log:
Fix '<rdar://problem/8202272> __imag passed non-complex should not crash' by removing a bogus assertion.
Modified:
cfe/trunk/lib/Checker/GRExprEngine.cpp
cfe/trunk/test/Analysis/misc-ps.m
Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=108602&r1=108601&r2=108602&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Fri Jul 16 20:28:55 2010
@@ -2835,8 +2835,7 @@
continue;
}
- // For all other types, UnaryOperator::Float returns 0.
- assert (Ex->getType()->isIntegerType());
+ // For all other types, UnaryOperator::Imag returns 0.
const GRState* state = GetState(*I);
SVal X = ValMgr.makeZeroVal(Ex->getType());
MakeNode(Dst, U, *I, state->BindExpr(U, X));
Modified: cfe/trunk/test/Analysis/misc-ps.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps.m?rev=108602&r1=108601&r2=108602&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps.m (original)
+++ cfe/trunk/test/Analysis/misc-ps.m Fri Jul 16 20:28:55 2010
@@ -1020,3 +1020,9 @@
*someStatic = 0; // expected-warning{{null pointer}}
}
+// <rdar://problem/8202272> - __imag passed non-complex should not crash
+float f0(_Complex float x) {
+ float l0 = __real x;
+ return __real l0 + __imag l0;
+}
+
More information about the cfe-commits
mailing list