diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-23 20:19:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-23 20:19:14 +0000 |
commit | 7aed66bbee5120e8378ff713de62ada557c0cd58 (patch) | |
tree | 5fff8b42f4278f19a4b84183da85487b8408a3ec /clang/test/Parser/cxx-ambig-decl-expr.cpp | |
parent | 59df25b659da1ee2da21f137ecde1658475d8cad (diff) | |
download | bcm5719-llvm-7aed66bbee5120e8378ff713de62ada557c0cd58.tar.gz bcm5719-llvm-7aed66bbee5120e8378ff713de62ada557c0cd58.zip |
When disambiguating an expression-statement from a declaraton-statement, if the
statement starts with an identifier for which name lookup will fail either way,
look at later tokens to disambiguate in order to improve error recovery.
llvm-svn: 162464
Diffstat (limited to 'clang/test/Parser/cxx-ambig-decl-expr.cpp')
-rw-r--r-- | clang/test/Parser/cxx-ambig-decl-expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-ambig-decl-expr.cpp b/clang/test/Parser/cxx-ambig-decl-expr.cpp index b5ff728b47c..feb185fbe3f 100644 --- a/clang/test/Parser/cxx-ambig-decl-expr.cpp +++ b/clang/test/Parser/cxx-ambig-decl-expr.cpp @@ -7,4 +7,7 @@ struct X { void f() { void (*ptr)(int, int) = &X::f<int, int>; + + unknown *p = 0; // expected-error {{unknown type name 'unknown'}} + unknown * p + 0; // expected-error {{undeclared identifier 'unknown'}} } |