diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-16 00:47:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-16 00:47:45 +0000 |
commit | 1600e2452113ec9979e866525c86b4ab83d866ff (patch) | |
tree | 4a9a73c0aeb200b4aa17b1306c021610fa865ccb /clang/test/Parser/cxx-class.cpp | |
parent | 1826095a5faa4303c9fb5d3c5aadc46bf66c1cd6 (diff) | |
download | bcm5719-llvm-1600e2452113ec9979e866525c86b4ab83d866ff.tar.gz bcm5719-llvm-1600e2452113ec9979e866525c86b4ab83d866ff.zip |
PR41192: fix cases where "missing ';' after class" error would
incorrectly fire.
llvm-svn: 358467
Diffstat (limited to 'clang/test/Parser/cxx-class.cpp')
-rw-r--r-- | clang/test/Parser/cxx-class.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp index 3cc006af23d..fe9c1ac95b4 100644 --- a/clang/test/Parser/cxx-class.cpp +++ b/clang/test/Parser/cxx-class.cpp @@ -272,6 +272,17 @@ class BadExceptionSpec { )); }; +namespace PR41192 { +extern struct A a; +struct A {} ::PR41192::a; // ok, no missing ';' here expected-warning {{extra qualification}} + +#if __cplusplus >= 201103L +struct C; +struct D { static C c; }; +struct C {} decltype(D())::c; // expected-error {{'decltype' cannot be used to name a declaration}} +#endif +} + // PR11109 must appear at the end of the source file class pr11109r3 { // expected-note{{to match this '{'}} public // expected-error{{expected ':'}} expected-error{{expected '}'}} expected-error{{expected ';' after class}} |