aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-24 20:34:43 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-24 20:34:43 +0000
commit7caa6825f42a0f7e97d6fc06233133c42b218e46 (patch)
tree1be851e7cede92bb39bcb037c00a6d9a9061e946 /lib/AST/Decl.cpp
parent0eb7cff82f943ebcb14f1c9a2020a83a030a0893 (diff)
Template instantiation for static data members that are defined out-of-line.
Note that this also fixes a bug that affects non-template code, where we were not treating out-of-line static data members are "file-scope" variables, and therefore not checking their initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index b4710c2c53..9701f6c90d 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -341,6 +341,10 @@ SourceRange VarDecl::getSourceRange() const {
return SourceRange(getLocation(), getLocation());
}
+VarDecl *VarDecl::getInstantiatedFromStaticDataMember() {
+ return getASTContext().getInstantiatedFromStaticDataMember(this);
+}
+
bool VarDecl::isTentativeDefinition(ASTContext &Context) const {
if (!isFileVarDecl() || Context.getLangOptions().CPlusPlus)
return false;