[analyzer] A base class needs a complete definition to provide offsets.

No test case yet; trying to reduce one from a failing internal buildbot.

llvm-svn: 161911
This commit is contained in:
Jordan Rose 2012-08-15 00:36:44 +00:00
parent be3c5dab76
commit 95c841eaa0
1 changed files with 1 additions and 1 deletions

View File

@ -1111,7 +1111,7 @@ RegionOffset MemRegion::getAsOffset() const {
} }
const CXXRecordDecl *Child = Ty->getAsCXXRecordDecl(); const CXXRecordDecl *Child = Ty->getAsCXXRecordDecl();
if (!Child) { if (!Child || !Child->isCompleteDefinition()) {
// We cannot compute the offset of the base class. // We cannot compute the offset of the base class.
SymbolicOffsetBase = R; SymbolicOffsetBase = R;
} }