aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-02-21 07:08:09 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-02-21 07:08:09 +0000
commit8761d680eaa7386e03f51286f4b84a1ffe575e2e (patch)
tree9ef5c9e8fa5f0dcf9e251600d3a429aa176ad355 /lib/AST/Decl.cpp
parent48108fdb9c3bcffe5bccd88a1a91353a4df71629 (diff)
Make Decl::isOutOfLine() virtual, and use that to determine when definitions
are for out of line declarations more easily. This simplifies the logic and handles the case of out-of-line class definitions correctly. Fixes PR6107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 5acb82f31a..23f5fba437 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -680,12 +680,12 @@ const Expr *VarDecl::getAnyInitializer(const VarDecl *&D) const {
}
bool VarDecl::isOutOfLine() const {
- if (!isStaticDataMember())
- return false;
-
if (Decl::isOutOfLine())
return true;
-
+
+ if (!isStaticDataMember())
+ return false;
+
// If this static data member was instantiated from a static data member of
// a class template, check whether that static data member was defined
// out-of-line.