diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-19 15:22:16 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-19 15:22:16 +0000 |
commit | 08b2c3743a29a2dddcf72e95f747760e213cdde7 (patch) | |
tree | 5c7f33ab3fe286c42643cfde7a88ec9979aa61b1 /test/SemaCXX/nested-name-spec.cpp | |
parent | fad03b2b38a3baea4b67e79e676fee15078e3258 (diff) |
Fix this:
With this snippet:
void f(a::b);
An assert is hit:
Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98
Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r-- | test/SemaCXX/nested-name-spec.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp index cf0500dffe..b22d8dc3d4 100644 --- a/test/SemaCXX/nested-name-spec.cpp +++ b/test/SemaCXX/nested-name-spec.cpp @@ -63,3 +63,6 @@ void f3() { { typedef A::C A; A::ax = 0; } // expected-error {{no member named 'ax'}} { typedef A::C A; A::cx = 0; } } + +// make sure the following doesn't hit any asserts +void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} // expected-error {{expected ')'}} expected-error {{to match this '('}} // expected-error {{variable has incomplete type 'void'}} |