summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx1z-using-declaration.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-12-20 21:35:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-12-20 21:35:28 +0000
commit151c4568581f1d6aea266aceb99f7cc683bfc10c (patch)
tree6a06c7b529f20ce83059a547db77184e03e303f1 /clang/test/Parser/cxx1z-using-declaration.cpp
parentd5508b4e89f8e3dcbf83d9eadbb77b2420ea5202 (diff)
downloadbcm5719-llvm-151c4568581f1d6aea266aceb99f7cc683bfc10c.tar.gz
bcm5719-llvm-151c4568581f1d6aea266aceb99f7cc683bfc10c.zip
[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
Diffstat (limited to 'clang/test/Parser/cxx1z-using-declaration.cpp')
-rw-r--r--clang/test/Parser/cxx1z-using-declaration.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx1z-using-declaration.cpp b/clang/test/Parser/cxx1z-using-declaration.cpp
index dab1ca82c2a..0be81677d9f 100644
--- a/clang/test/Parser/cxx1z-using-declaration.cpp
+++ b/clang/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}}
OpenPOWER on IntegriCloud