[c++1z] P0195R2: Support pack-expansion of using-declarations.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 20 Dec 2016 21:35:28 +0000 (21:35 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 20 Dec 2016 21:35:28 +0000 (21:35 +0000)
commit151c4568581f1d6aea266aceb99f7cc683bfc10c
tree6a06c7b529f20ce83059a547db77184e03e303f1
parentd5508b4e89f8e3dcbf83d9eadbb77b2420ea5202
[c++1z] P0195R2: Support pack-expansion of using-declarations.

This change introduces UsingPackDecl as a marker for the set of UsingDecls
produced by pack expansion of a single (unresolved) using declaration. This is
not strictly necessary (we just need to be able to map from the original using
declaration to its expansions somehow), but it's useful to maintain the
invariant that each declaration reference instantiates to refer to one
declaration.

This is a re-commit of r290080 (reverted in r290092) with a fix for a
use-after-lifetime bug.

llvm-svn: 290203
26 files changed:
clang/include/clang/AST/DeclCXX.h
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/Basic/DeclNodes.td
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/Sema.h
clang/include/clang/Sema/Template.h
clang/include/clang/Serialization/ASTBitCodes.h
clang/lib/AST/DeclBase.cpp
clang/lib/AST/DeclCXX.cpp
clang/lib/CodeGen/CGDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/SemaTemplateVariadic.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTCommon.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/PCH/cxx1z-using-declaration.cpp [new file with mode: 0644]
clang/test/Parser/cxx1z-using-declaration.cpp
clang/test/SemaTemplate/cxx1z-using-declaration.cpp [new file with mode: 0644]
clang/tools/libclang/CIndex.cpp