aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/CallEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Core/CallEvent.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/CallEvent.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp
index b28c01d035..3b9e1e1979 100644
--- a/lib/StaticAnalyzer/Core/CallEvent.cpp
+++ b/lib/StaticAnalyzer/Core/CallEvent.cpp
@@ -393,6 +393,10 @@ const Decl *CXXInstanceCall::getRuntimeDefinition() const {
// If the method is virtual, see if we can find the actual implementation
// based on context-sensitivity.
+ // FIXME: Virtual method calls behave differently when an object is being
+ // constructed or destructed. It's not as simple as "no devirtualization"
+ // because a /partially/ constructed object can be referred to through a
+ // base pointer. We'll eventually want to use DynamicTypeInfo here.
if (const CXXMethodDecl *Devirtualized = devirtualize(MD, getCXXThisVal()))
return Devirtualized;
@@ -527,6 +531,10 @@ const Decl *CXXDestructorCall::getRuntimeDefinition() const {
// If the method is virtual, see if we can find the actual implementation
// based on context-sensitivity.
+ // FIXME: Virtual method calls behave differently when an object is being
+ // constructed or destructed. It's not as simple as "no devirtualization"
+ // because a /partially/ constructed object can be referred to through a
+ // base pointer. We'll eventually want to use DynamicTypeInfo here.
if (const CXXMethodDecl *Devirtualized = devirtualize(MD, getCXXThisVal()))
return Devirtualized;