summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-15 17:33:37 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-15 17:33:37 +0000
commit9910720851ade6f6edbc2e86455b830e4f7c9f91 (patch)
treecc9ad31bd83341573d03fdd734cbcbab1c286d83 /clang/lib/StaticAnalyzer/Core/CallEvent.cpp
parent31c3fa9c24c532f513d6f216e51f821a15ba2685 (diff)
downloadbcm5719-llvm-9910720851ade6f6edbc2e86455b830e4f7c9f91.tar.gz
bcm5719-llvm-9910720851ade6f6edbc2e86455b830e4f7c9f91.zip
[analyzer] Don't try to devirtualize if the class is incomplete.
A similar issue to the previous commit, introduced by r161915. llvm-svn: 161961
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CallEvent.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/CallEvent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
index c625f24e07f..8481cd9c339 100644
--- a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud