summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-04-16 00:47:45 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-04-16 00:47:45 +0000
commit1600e2452113ec9979e866525c86b4ab83d866ff (patch)
tree4a9a73c0aeb200b4aa17b1306c021610fa865ccb /clang/test/Parser/cxx-class.cpp
parent1826095a5faa4303c9fb5d3c5aadc46bf66c1cd6 (diff)
downloadbcm5719-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.cpp11
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}}
OpenPOWER on IntegriCloud