From 152a172899034b5f9c34420621cd9cfa74c68efa Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 23 Feb 2015 21:16:05 +0000 Subject: 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 --- clang/test/Parser/cxx-ambig-init-templ.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/test/Parser/cxx-ambig-init-templ.cpp') 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 struct X { + operator int(); + }; + struct Y { + void f(int a = X<0, int (*)()>()); + }; +} + namespace PR20459 { template struct A { void foo(int = EncTraits::template TypeEnc::val); // ok -- cgit v1.2.3