summaryrefslogtreecommitdiffstats
path: root/clang/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
commitf50ef6ed9aec398aeb340808bdfbc012d30a9e73 (patch)
treedef9e118679c9420a5fa4757d88698adb0ee4488 /clang/lib/AST/Decl.cpp
parent56ec7895210b6b488d9915963927489085000278 (diff)
downloadbcm5719-llvm-f50ef6ed9aec398aeb340808bdfbc012d30a9e73.tar.gz
bcm5719-llvm-f50ef6ed9aec398aeb340808bdfbc012d30a9e73.zip
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. llvm-svn: 96729
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 5acb82f31a2..23f5fba437a 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud