[cfe-commits] r161911 - /cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp

Jordan Rose jordan_rose at apple.com
Tue Aug 14 17:36:45 PDT 2012


Author: jrose
Date: Tue Aug 14 19:36:44 2012
New Revision: 161911

URL: http://llvm.org/viewvc/llvm-project?rev=161911&view=rev
Log:
[analyzer] A base class needs a complete definition to provide offsets.

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

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp?rev=161911&r1=161910&r2=161911&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Tue Aug 14 19:36:44 2012
@@ -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;
       }





More information about the cfe-commits mailing list