aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/MemRegion.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-15 00:36:44 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-15 00:36:44 +0000
commitcd6873e5c6b89caefa0baeb21c4ad94976fa1b8a (patch)
tree1e106456c3740849bd8b83d9e557f4630dc61520 /lib/StaticAnalyzer/Core/MemRegion.cpp
parent1b4b1461da093bfcb85edfb67710d21f79c7f16c (diff)
[analyzer] A base class needs a complete definition to provide offsets.
No test case yet; trying to reduce one from a failing internal buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/MemRegion.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/MemRegion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/MemRegion.cpp b/lib/StaticAnalyzer/Core/MemRegion.cpp
index 62e602a7e1..4f33bad492 100644
--- a/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/lib/StaticAnalyzer/Core/MemRegion.cpp
@@ -1111,7 +1111,7 @@ RegionOffset MemRegion::getAsOffset() const {
}
const CXXRecordDecl *Child = Ty->getAsCXXRecordDecl();
- if (!Child) {
+ if (!Child || !Child->isCompleteDefinition()) {
// We cannot compute the offset of the base class.
SymbolicOffsetBase = R;
}