diff options
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/AST/Decl.h | 1 | ||||
-rw-r--r-- | clang/include/clang/AST/DeclTemplate.h | 6 | ||||
-rw-r--r-- | clang/include/clang/AST/Type.h | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index aa009c8b4c0..9536eca300c 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -814,6 +814,7 @@ class TypeDecl : public NamedDecl { friend class DeclContext; friend class TagDecl; friend class TemplateTypeParmDecl; + friend class ClassTemplateSpecializationDecl; protected: TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index a075d74e610..92c2d6b8f67 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -606,6 +606,12 @@ public: Profile(ID, template_arg_begin(), getNumTemplateArgs()); } + /// \brief Sets the type of this specialization as it was written by + /// the user. This will be a class template specialization type. + void setTypeAsWritten(QualType T) { + TypeForDecl = T.getTypePtr(); + } + static void Profile(llvm::FoldingSetNodeID &ID, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs) { diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index f5bd5f19f0f..3ee513b17f4 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -407,6 +407,7 @@ public: const BlockPointerType *getAsBlockPointerType() const; const ReferenceType *getAsReferenceType() const; const MemberPointerType *getAsMemberPointerType() const; + const TagType *getAsTagType() const; const RecordType *getAsRecordType() const; const RecordType *getAsStructureType() const; /// NOTE: getAs*ArrayType are methods on ASTContext. @@ -1309,7 +1310,7 @@ class TagType : public Type { /// definition in progress), if there is such a definition. The /// single-bit value will be non-zero when this tag is in the /// process of being defined. - llvm::PointerIntPair<TagDecl *, 1> decl; + mutable llvm::PointerIntPair<TagDecl *, 1> decl; friend class ASTContext; friend class TagDecl; |