forked from OSchip/llvm-project
Provide SizeOfAlignTypeExpr workaround in the static analyzer for taking the sizeof of a ObjCInterfaceType.
llvm-svn: 50499
This commit is contained in:
parent
e0e8b535cf
commit
99057462aa
|
@ -1432,6 +1432,12 @@ void GRExprEngine::VisitSizeOfAlignOfTypeExpr(SizeOfAlignOfTypeExpr* Ex,
|
||||||
if (!T.getTypePtr()->isConstantSizeType())
|
if (!T.getTypePtr()->isConstantSizeType())
|
||||||
return;
|
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)
|
amt = 1; // Handle sizeof(void)
|
||||||
|
|
||||||
if (T != getContext().VoidTy)
|
if (T != getContext().VoidTy)
|
||||||
|
|
Loading…
Reference in New Issue