diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-02-23 21:16:05 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-02-23 21:16:05 +0000 |
commit | 152a172899034b5f9c34420621cd9cfa74c68efa (patch) | |
tree | 047c268b46d9e8d7de38ab6bf228e03b5ca9fd4c /clang/test/Parser/cxx-ambig-init-templ.cpp | |
parent | 0168d34e238cb928c05309caac4eb4d50e739b0c (diff) | |
download | bcm5719-llvm-152a172899034b5f9c34420621cd9cfa74c68efa.tar.gz bcm5719-llvm-152a172899034b5f9c34420621cd9cfa74c68efa.zip |
Improve declaration / expression disambiguation around ptr-operators, and use
the presence of an abstract declarator with a ptr-operator as proof that a
construct cannot parse as an expression to improve diagnostics along error
recovery paths.
llvm-svn: 230261
Diffstat (limited to 'clang/test/Parser/cxx-ambig-init-templ.cpp')
-rw-r--r-- | clang/test/Parser/cxx-ambig-init-templ.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-ambig-init-templ.cpp b/clang/test/Parser/cxx-ambig-init-templ.cpp index 1f692664137..584262c9be4 100644 --- a/clang/test/Parser/cxx-ambig-init-templ.cpp +++ b/clang/test/Parser/cxx-ambig-init-templ.cpp @@ -170,6 +170,15 @@ namespace ElaboratedTypeSpecifiers { }; } +namespace AbstractPtrOperatorDeclarator { + template <int, typename> struct X { + operator int(); + }; + struct Y { + void f(int a = X<0, int (*)()>()); + }; +} + namespace PR20459 { template <typename EncTraits> struct A { void foo(int = EncTraits::template TypeEnc<int, int>::val); // ok |