diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-20 21:35:28 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-20 21:35:28 +0000 |
commit | c8c1a1961a459f5f79ba8dfb08a2d53d5443bf32 (patch) | |
tree | c042187cdc68b1038bde77c652ded7a849bd53d3 /test/Parser | |
parent | a966b1fd6ce257ab259c534488003e7aef57a0ff (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/cxx1z-using-declaration.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/Parser/cxx1z-using-declaration.cpp b/test/Parser/cxx1z-using-declaration.cpp index dab1ca82c2..0be81677d9 100644 --- a/test/Parser/cxx1z-using-declaration.cpp +++ b/test/Parser/cxx1z-using-declaration.cpp @@ -10,10 +10,10 @@ namespace B { } struct X { - int x1, x2, y, z; // expected-note {{conflicting}} + int x1, x2, y, z; // expected-note 2{{conflicting}} }; struct Y { - int x1, x2, y, z; // expected-note {{target}} + int x1, x2, y, z; // expected-note 2{{target}} }; struct Z : X, Y { using X::x1, @@ -28,3 +28,8 @@ int X::*px1 = &Z::x1; int X::*px2 = &Z::x2; int Y::*py = &Z::y; int X::*pz = &Z::z; + +template<typename ...T> struct Q : T... { + using T::z...; // expected-error {{conflicts}} +}; +Q<X,Y> q; // expected-note {{instantiation of}} |