From 3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 5 May 2011 21:57:07 +0000 Subject: [PATCH] Implement support for C++0x alias templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LanguageExtensions.html | 6 + include/clang/AST/DeclTemplate.h | 75 +++++++++ include/clang/AST/RecursiveASTVisitor.h | 5 + include/clang/AST/Type.h | 21 ++- include/clang/Basic/DeclNodes.td | 1 + include/clang/Basic/DiagnosticParseKinds.td | 2 + include/clang/Basic/DiagnosticSemaKinds.td | 14 +- include/clang/Sema/DeclSpec.h | 6 +- include/clang/Sema/Sema.h | 9 +- include/clang/Sema/Template.h | 3 +- include/clang/Serialization/ASTBitCodes.h | 2 + lib/AST/ASTContext.cpp | 56 ++++--- lib/AST/ASTDiagnostic.cpp | 8 +- lib/AST/DeclBase.cpp | 1 + lib/AST/DeclTemplate.cpp | 31 ++++ lib/AST/DumpXML.cpp | 3 +- lib/AST/Type.cpp | 31 +++- lib/CodeGen/CGDecl.cpp | 1 + lib/CodeGen/CodeGenModule.cpp | 1 + lib/Lex/PPMacroExpansion.cpp | 1 + lib/Parse/ParseDeclCXX.cpp | 48 ++++-- lib/Parse/ParseTemplate.cpp | 8 +- lib/Sema/SemaAccess.cpp | 4 +- lib/Sema/SemaCXXScopeSpec.cpp | 21 ++- lib/Sema/SemaDecl.cpp | 41 +++-- lib/Sema/SemaDeclCXX.cpp | 100 +++++++++++- lib/Sema/SemaTemplate.cpp | 84 +++++++--- lib/Sema/SemaTemplateInstantiate.cpp | 12 +- lib/Sema/SemaTemplateInstantiateDecl.cpp | 55 ++++++- lib/Sema/SemaType.cpp | 26 ++-- lib/Sema/TreeTransform.h | 37 ++++- lib/Serialization/ASTReader.cpp | 6 +- lib/Serialization/ASTReaderDecl.cpp | 8 + lib/Serialization/ASTWriter.cpp | 3 +- lib/Serialization/ASTWriterDecl.cpp | 6 + .../dcl.spec/dcl.type/dcl.type.elab/p2-0x.cpp | 13 ++ test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp | 5 +- test/CXX/temp/temp.decls/p3.cpp | 8 + test/CXX/temp/temp.decls/temp.alias/p1.cpp | 8 + test/CXX/temp/temp.decls/temp.alias/p2.cpp | 45 ++++++ test/CXX/temp/temp.decls/temp.alias/p3.cpp | 13 ++ test/CXX/temp/temp.param/p10-0x.cpp | 13 ++ test/CXX/temp/temp.param/p11-0x.cpp | 31 +++- .../temp.res/temp.dep/temp.dep.type/p1.cpp | 30 ++++ test/CXX/temp/temp.type/p1-0x.cpp | 23 +++ test/CodeGenCXX/mangle-alias-template.cpp | 41 +++++ .../mangle-unnameable-conversions.cpp | 14 ++ test/Lexer/has_feature_cxx0x.cpp | 9 ++ test/PCH/cxx-alias-decl.cpp | 20 +++ test/PCH/cxx-alias-decl.h | 11 ++ test/SemaCXX/alias-template.cpp | 147 ++++++++++++++++++ test/SemaCXX/attr-cxx0x.cpp | 5 + test/SemaCXX/dependent-types.cpp | 5 +- test/SemaCXX/redeclared-alias-template.cpp | 23 +++ test/SemaTemplate/alias-church-numerals.cpp | 34 ++++ test/SemaTemplate/alias-nested-nontag.cpp | 6 + .../alias-template-template-param.cpp | 7 + tools/libclang/CIndex.cpp | 1 + www/cxx_status.html | 9 +- 59 files changed, 1119 insertions(+), 138 deletions(-) create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p2-0x.cpp create mode 100644 test/CXX/temp/temp.decls/p3.cpp create mode 100644 test/CXX/temp/temp.decls/temp.alias/p1.cpp create mode 100644 test/CXX/temp/temp.decls/temp.alias/p2.cpp create mode 100644 test/CXX/temp/temp.decls/temp.alias/p3.cpp create mode 100644 test/CXX/temp/temp.param/p10-0x.cpp create mode 100644 test/CXX/temp/temp.res/temp.dep/temp.dep.type/p1.cpp create mode 100644 test/CXX/temp/temp.type/p1-0x.cpp create mode 100644 test/CodeGenCXX/mangle-alias-template.cpp create mode 100644 test/CodeGenCXX/mangle-unnameable-conversions.cpp create mode 100644 test/PCH/cxx-alias-decl.cpp create mode 100644 test/PCH/cxx-alias-decl.h create mode 100644 test/SemaCXX/alias-template.cpp create mode 100644 test/SemaCXX/redeclared-alias-template.cpp create mode 100644 test/SemaTemplate/alias-church-numerals.cpp create mode 100644 test/SemaTemplate/alias-nested-nontag.cpp create mode 100644 test/SemaTemplate/alias-template-template-param.cpp diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html index f86835a9d1..9dcddfad60 100644 --- a/docs/LanguageExtensions.html +++ b/docs/LanguageExtensions.html @@ -32,6 +32,7 @@ td {
  • Checks for Upcoming Standard Language Features