summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2017-06-11 20:33:00 +0000
committerJohn McCall <rjmccall@apple.com>2017-06-11 20:33:00 +0000
commitcb731548fa8f78c4deec94dce12c6af59c2b033a (patch)
tree37b8e6ca3056abf35102e12c5a94b19846ce50f3 /clang/test/SemaCXX/nested-name-spec.cpp
parentdcfc0413ab3dc42d55f4b63662d3440d899cb03a (diff)
downloadbcm5719-llvm-cb731548fa8f78c4deec94dce12c6af59c2b033a.tar.gz
bcm5719-llvm-cb731548fa8f78c4deec94dce12c6af59c2b033a.zip
Don't crash when forming a destructor name on an incomplete type.
Fixes PR25156. Patch by Don Hinton! llvm-svn: 305169
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index 6ae45ff6333..725ac64cedb 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -169,6 +169,13 @@ void N::f() { } // okay
struct Y; // expected-note{{forward declaration of 'Y'}}
Y::foo y; // expected-error{{incomplete type 'Y' named in nested name specifier}}
+namespace PR25156 {
+struct Y; // expected-note{{forward declaration of 'PR25156::Y'}}
+void foo() {
+ Y::~Y(); // expected-error{{incomplete type 'PR25156::Y' named in nested name specifier}}
+}
+}
+
X::X() : a(5) { } // expected-error{{use of undeclared identifier 'X'}}
struct foo_S {
OpenPOWER on IntegriCloud