diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-07-31 18:04:49 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-07-31 18:04:49 +0000 |
commit | 6d8ab45a203eb701c2fd1104492cb4bd7557a3e9 (patch) | |
tree | a21fe212536f3cbfbfb7d94865ceb0917df1cdb8 /lib/StaticAnalyzer/Core/CallEvent.cpp | |
parent | 5deddafd3ef51e94b4ac4d80e38271d3768b1af6 (diff) |
[analyzer] Add a FIXME about devirtualization in ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CallEvent.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CallEvent.cpp | 8 |
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; |