[cfe-commits] r50499 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Wed Apr 30 14:31:12 PDT 2008
Author: kremenek
Date: Wed Apr 30 16:31:12 2008
New Revision: 50499
URL: http://llvm.org/viewvc/llvm-project?rev=50499&view=rev
Log:
Provide SizeOfAlignTypeExpr workaround in the static analyzer for taking the sizeof of a ObjCInterfaceType.
Modified:
cfe/trunk/lib/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=50499&r1=50498&r2=50499&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Wed Apr 30 16:31:12 2008
@@ -1432,6 +1432,12 @@
if (!T.getTypePtr()->isConstantSizeType())
return;
+ // Some code tries to take the sizeof an ObjCInterfaceType, relying that
+ // the compiler has laid out its representation. Just report Unknown
+ // for these.
+ if (T->isObjCInterfaceType())
+ return;
+
amt = 1; // Handle sizeof(void)
if (T != getContext().VoidTy)
More information about the cfe-commits
mailing list