[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CXX / dcl.decl / dcl.meaning / p1.cpp
blobcefee7b8dc41ee4b63ffb125e8510b96cf58074b
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 namespace PR8019 {
4 struct x;
5 template<typename T> struct x2;
6 struct y {
7 struct PR8019::x { int x; }; // expected-error{{non-friend class member 'x' cannot have a qualified name}}
9 struct inner;
10 struct y::inner { }; // expected-error{{extra qualification on member 'inner'}}
12 template<typename T>
13 struct PR8019::x2 { }; // expected-error{{non-friend class member 'x2' cannot have a qualified name}}
15 template<typename T>
16 struct inner_template;
18 template<typename T>
19 struct y::inner_template { }; // expected-error{{extra qualification on member 'inner_template'}}
24 namespace NS {
25 void foo();
26 extern int bar;
27 struct X;
28 template<typename T> struct Y;
29 template<typename T> void wibble(T);
30 struct Z;
32 namespace NS {
33 // Under DR482, these are all valid, except for forward-declaring a struct
34 // with a nested-name-specifier.
35 void NS::foo(); // expected-warning {{extra qualification}}
36 extern int NS::bar; // expected-warning {{extra qualification}}
37 struct NS::X; // expected-error {{forward declaration of struct cannot have a nested name specifier}} expected-warning {{extra qualification}}
38 template<typename T> struct NS::Y; // expected-error {{forward declaration of struct cannot have a nested name specifier}} expected-warning {{extra qualification}}
39 template<typename T> void NS::wibble(T); // expected-warning {{extra qualification}}
41 void NS::foo() {} // expected-warning{{extra qualification on member 'foo'}}
42 int NS::bar; // expected-warning{{extra qualification on member 'bar'}}
43 struct NS::X { }; // expected-warning{{extra qualification on member 'X'}}
44 template<typename T> struct NS::Y { }; // expected-warning{{extra qualification on member 'Y'}}
45 template<typename T> void NS::wibble(T) { } // expected-warning{{extra qualification on member 'wibble'}}
48 struct ::{} a; // expected-error{{expected identifier}}
49 struct NS::Z:: {} b; // expected-error{{expected identifier}}