[cfe-commits] r64200 - /cfe/trunk/lib/Analysis/GRSimpleVals.cpp
Ted Kremenek
kremenek at apple.com
Mon Feb 9 21:42:58 PST 2009
Author: kremenek
Date: Mon Feb 9 23:42:58 2009
New Revision: 64200
URL: http://llvm.org/viewvc/llvm-project?rev=64200&view=rev
Log:
Fix a crash in GRSimpleVals::EvalCast due not handling transparent unions.
Modified:
cfe/trunk/lib/Analysis/GRSimpleVals.cpp
Modified: cfe/trunk/lib/Analysis/GRSimpleVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRSimpleVals.cpp?rev=64200&r1=64199&r2=64200&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRSimpleVals.cpp (original)
+++ cfe/trunk/lib/Analysis/GRSimpleVals.cpp Mon Feb 9 23:42:58 2009
@@ -74,6 +74,11 @@
if (Loc::IsLocType(T) || T->isReferenceType())
return X;
+ // FIXME: Handle transparent unions where a value can be "transparently"
+ // lifted into a union type.
+ if (T->isUnionType())
+ return UnknownVal();
+
assert (T->isIntegerType());
BasicValueFactory& BasicVals = Eng.getBasicVals();
unsigned BitWidth = Eng.getContext().getTypeSize(T);
More information about the cfe-commits
mailing list