[cfe-commits] r161961 - /cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp

Jordan Rose jordan_rose at apple.com
Wed Aug 15 10:33:37 PDT 2012


Author: jrose
Date: Wed Aug 15 12:33:37 2012
New Revision: 161961

URL: http://llvm.org/viewvc/llvm-project?rev=161961&view=rev
Log:
[analyzer] Don't try to devirtualize if the class is incomplete.

A similar issue to the previous commit, introduced by r161915.

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

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp?rev=161961&r1=161960&r2=161961&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp Wed Aug 15 12:33:37 2012
@@ -401,7 +401,7 @@
   // Is the type a C++ class? (This is mostly a defensive check.)
   QualType RegionType = DynType.getType()->getPointeeType();
   const CXXRecordDecl *RD = RegionType->getAsCXXRecordDecl();
-  if (!RD)
+  if (!RD || !RD->hasDefinition())
     return RuntimeDefinition();
 
   // Find the decl for this method in that class.





More information about the cfe-commits mailing list