aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/nested-name-spec.cpp
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
commit4c72d3ec68b88868a75b3e6bbe5520dcefe86a95 (patch)
treeb8a2e46cae017f47e5e950ac907f64941487d071 /test/SemaCXX/nested-name-spec.cpp
parente228ba97c9aff14dcf788773b8af455b9d85f210 (diff)
Fix the crash-on-invalid from PR6259.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--test/SemaCXX/nested-name-spec.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index dbbf1fecc9..8a217b3120 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/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}}
+ }
+}