summaryrefslogtreecommitdiffstats
path: root/clang
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
commit95c841eaa0ffa9d3423f61c1099b5ffff2dfdff9 (patch)
tree12798d2fd8b85e5682a0dc1dabce468a6b8b09e7 /clang
parentbe3c5dab76099a47102c7f8b1073d33b8fe603e5 (diff)
downloadbcm5719-llvm-95c841eaa0ffa9d3423f61c1099b5ffff2dfdff9.tar.gz
bcm5719-llvm-95c841eaa0ffa9d3423f61c1099b5ffff2dfdff9.zip
[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
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/StaticAnalyzer/Core/MemRegion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
index 62e602a7e1e..4f33bad4928 100644
--- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud