summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-11 16:48:53 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-11 16:48:53 +0000
commit26897467058db53eb3446af4904c7dbb80897ada (patch)
tree1d550f16f7b26845bded821246dd94c7681124d2 /clang/test/SemaCXX/nested-name-spec.cpp
parentf24fcff65e3b4c1f6090c7845be0cfee8bbd15d0 (diff)
downloadbcm5719-llvm-26897467058db53eb3446af4904c7dbb80897ada.tar.gz
bcm5719-llvm-26897467058db53eb3446af4904c7dbb80897ada.zip
Add basic, hackish support for instantiation of typedefs in a class
template. More importantly, start to sort out the issues regarding complete types and nested-name-specifiers, especially the question of: when do we instantiate a class template specialization that occurs to the left of a '::' in a nested-name-specifier? llvm-svn: 66662
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index 2b6de3363b7..f75b279a449 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -1,5 +1,4 @@
-// RUN: clang -fsyntax-only -verify -std=c++98 %s
-// fails due to exact diagnostic matching
+// RUN: clang -fsyntax-only -std=c++98 -verify %s
namespace A {
struct C {
static int cx;
@@ -151,5 +150,10 @@ void ::global_func2(int) { } // expected-error{{definition or redeclaration of '
void N::f() { } // okay
+struct Y; // expected-note{{forward declaration of 'struct Y'}}
+Y::foo y; // expected-error{{incomplete type 'struct Y' named in nested name specifier}} \
+ // FIXME: ugly: expected-error{{invalid token after top level declarator}}
+
X::X() : a(5) { } // expected-error{{use of undeclared identifier 'X'}} \
// expected-error{{expected function body after function declarator}}
+
OpenPOWER on IntegriCloud