From fc87350ce0b279c82b1c9d2647063f4acf48a978 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Wed, 15 Aug 2012 17:33:37 +0000 Subject: [PATCH] [analyzer] Don't try to devirtualize if the class is incomplete. A similar issue to the previous commit, introduced by r161915. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161961 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/CallEvent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp index c625f24e07..8481cd9c33 100644 --- a/lib/StaticAnalyzer/Core/CallEvent.cpp +++ b/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -401,7 +401,7 @@ RuntimeDefinition CXXInstanceCall::getRuntimeDefinition() const { // 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. -- 2.50.1