summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-08 19:26:07 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-08 19:26:07 +0000
commit69f9dbc3e4a4a22b6aea560d386d70cabc885ef8 (patch)
tree723e679850897dab78f57f86d548c0996222f1c2 /clang/test
parent75cc359fdc062b1f484929c97d27a76167a47a33 (diff)
downloadbcm5719-llvm-69f9dbc3e4a4a22b6aea560d386d70cabc885ef8.tar.gz
bcm5719-llvm-69f9dbc3e4a4a22b6aea560d386d70cabc885ef8.zip
Fix the crash-on-invalid from PR6259.
llvm-svn: 95554
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index dbbf1fecc9f..8a217b31208 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -220,3 +220,12 @@ namespace test2 {
int *ns::count_ptr = &count;
}
+
+// PR6259, invalid case
+namespace test3 {
+ // FIXME: this should really only trigger once
+ class A; // expected-note 2 {{forward declaration}}
+ void foo(const char *path) {
+ A::execute(path); // expected-error 2 {{incomplete type 'class test3::A' named in nested name specifier}}
+ }
+}
OpenPOWER on IntegriCloud