diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-14 22:17:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-14 22:17:06 +0000 |
commit | f4382f50b7ab9f445c3f5b3ddaa59e6da25ea3bb (patch) | |
tree | c40a54645a3b931b525d2f33f0a8ff0903b4f014 /test/SemaTemplate/nested-name-spec-template.cpp | |
parent | 17fc223395d51be582fc666bb6ea21bd1dff26dc (diff) |
Make the implicit-int handling error recovery stuff handle C++
nested name specifiers. Now we emit stuff like:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^
instead of:
t.cpp:8:16: error: invalid token after top level declarator
static foo::X P;
^
This is inspired by a really awful error message I got from
g++ when I misspelt diag::kind as diag::Kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69086 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/nested-name-spec-template.cpp')
-rw-r--r-- | test/SemaTemplate/nested-name-spec-template.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/SemaTemplate/nested-name-spec-template.cpp b/test/SemaTemplate/nested-name-spec-template.cpp index 7805040048..a5aa2dcb52 100644 --- a/test/SemaTemplate/nested-name-spec-template.cpp +++ b/test/SemaTemplate/nested-name-spec-template.cpp @@ -2,7 +2,7 @@ namespace N { namespace M { - template<typename T> struct Promote; // expected-note{{previous definition is here}} + template<typename T> struct Promote; template<> struct Promote<short> { typedef int type; @@ -32,8 +32,7 @@ N::M::template; // expected-error{{expected template name after 'template' keywo // expected-error{{expected unqualified-id}} N::M::template Promote; // expected-error{{expected '<' after 'template Promote' in nested name specifier}} \ -// expected-error{{C++ requires a type specifier for all declarations}} \ -// expected-error{{redefinition of 'Promote' as different kind of symbol}} +// expected-error{{C++ requires a type specifier for all declarations}} namespace N { template<typename T> struct A; |