summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/AST/DeclTemplate.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/AST/DeclTemplate.h')
-rw-r--r--clang/include/clang/AST/DeclTemplate.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h
index 991f0736065..96493fc78bd 100644
--- a/clang/include/clang/AST/DeclTemplate.h
+++ b/clang/include/clang/AST/DeclTemplate.h
@@ -2540,6 +2540,12 @@ class VarTemplateSpecializationDecl : public VarDecl,
/// Really a value of type TemplateSpecializationKind.
unsigned SpecializationKind : 3;
+ /// \brief Whether this declaration is a complete definition of the
+ /// variable template specialization. We can't otherwise tell apart
+ /// an instantiated declaration from an instantiated definition with
+ /// no initializer.
+ unsigned IsCompleteDefinition : 1;
+
protected:
VarTemplateSpecializationDecl(Kind DK, ASTContext &Context, DeclContext *DC,
SourceLocation StartLoc, SourceLocation IdLoc,
@@ -2553,6 +2559,7 @@ protected:
public:
friend class ASTDeclReader;
friend class ASTDeclWriter;
+ friend class VarDecl;
static VarTemplateSpecializationDecl *
Create(ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
@@ -2616,6 +2623,8 @@ public:
PointOfInstantiation = Loc;
}
+ void setCompleteDefinition() { IsCompleteDefinition = true; }
+
/// \brief If this variable template specialization is an instantiation of
/// a template (rather than an explicit specialization), return the
/// variable template or variable template partial specialization from which
OpenPOWER on IntegriCloud