[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
diff --git a/lib/StaticAnalyzer/Core/MemRegion.cpp b/lib/StaticAnalyzer/Core/MemRegion.cpp
index 62e602a..4f33bad 100644
--- a/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/lib/StaticAnalyzer/Core/MemRegion.cpp
@@ -1111,7 +1111,7 @@
       }
       
       const CXXRecordDecl *Child = Ty->getAsCXXRecordDecl();
-      if (!Child) {
+      if (!Child || !Child->isCompleteDefinition()) {
         // We cannot compute the offset of the base class.
         SymbolicOffsetBase = R;
       }