From 264ec4f2377624a9ef3418d40de67b7579b5c5f5 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 17 Feb 2009 01:05:43 +0000 Subject: Added ClassTemplateSpecializationDecl, which is a subclass of CXXRecordDecl that is used to represent class template specializations. These are canonical declarations that can refer to either an actual class template specialization in the code, e.g., template<> class vector { }; or to a template instantiation. However, neither of these features is actually implemented yet, so really we're just using (and uniqing) the declarations to make sure that, e.g., A is a different type from A. Note that we carefully distinguish between what the user wrote in the source code (e.g., "A") and the semantic entity it represents (e.g., "A"); the former is in the sugared Type, the latter is an actual Decl. llvm-svn: 64716 --- clang/lib/AST/DeclCXX.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/AST/DeclCXX.cpp') diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 6de575411b3..294e94f5f4e 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -21,9 +21,9 @@ using namespace clang; // Decl Allocation/Deallocation Method Implementations //===----------------------------------------------------------------------===// -CXXRecordDecl::CXXRecordDecl(TagKind TK, DeclContext *DC, +CXXRecordDecl::CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id) - : RecordDecl(CXXRecord, TK, DC, L, Id), + : RecordDecl(K, TK, DC, L, Id), UserDeclaredConstructor(false), UserDeclaredCopyConstructor(false), UserDeclaredCopyAssignment(false), UserDeclaredDestructor(false), Aggregate(true), PlainOldData(true), Polymorphic(false), Bases(0), @@ -32,7 +32,7 @@ CXXRecordDecl::CXXRecordDecl(TagKind TK, DeclContext *DC, CXXRecordDecl *CXXRecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, CXXRecordDecl* PrevDecl) { - CXXRecordDecl* R = new (C) CXXRecordDecl(TK, DC, L, Id); + CXXRecordDecl* R = new (C) CXXRecordDecl(CXXRecord, TK, DC, L, Id); C.getTypeDeclType(R, PrevDecl); return R; } -- cgit v1.2.3