[analyzer] Add a FIXME about devirtualization in ctors/dtors.

llvm-svn: 161058
This commit is contained in:
Jordan Rose 2012-07-31 18:04:49 +00:00
parent 008eaf8460
commit 1f8c0b4587
1 changed files with 8 additions and 0 deletions

View File

@ -393,6 +393,10 @@ const Decl *CXXInstanceCall::getRuntimeDefinition() const {
// If the method is virtual, see if we can find the actual implementation // If the method is virtual, see if we can find the actual implementation
// based on context-sensitivity. // 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())) if (const CXXMethodDecl *Devirtualized = devirtualize(MD, getCXXThisVal()))
return Devirtualized; return Devirtualized;
@ -527,6 +531,10 @@ const Decl *CXXDestructorCall::getRuntimeDefinition() const {
// If the method is virtual, see if we can find the actual implementation // If the method is virtual, see if we can find the actual implementation
// based on context-sensitivity. // 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())) if (const CXXMethodDecl *Devirtualized = devirtualize(MD, getCXXThisVal()))
return Devirtualized; return Devirtualized;