clang-1/test/CXX
Douglas Gregor 0efc2c1716 Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

  C(int); // constructor

and

  C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

  C::C C::f(int); // error: C::C refers to the constructor name, but
                  // we complain nicely and recover by treating it as
                  // a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 17:31:36 +00:00
..
basic Reimplement constructor declarator parsing to cope with template-ids 2010-01-13 17:31:36 +00:00
class Initialization improvements: addition of string initialization and a few 2009-12-19 08:11:05 +00:00
class.access/class.access.dcl Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
class.derived Fix for PR5840: fix the kind of name lookup used for classes in 2009-12-21 01:42:38 +00:00
dcl.dcl C++0x [dcl.typedef]p4, take 3, where we actually figure out what "that 2010-01-11 22:30:10 +00:00
dcl.decl Improve the reporting of non-viable overload candidates by noting the reason 2010-01-13 00:25:19 +00:00
expr Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
lex/lex.trigraph Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
over Initialization improvements: addition of string initialization and a few 2009-12-19 08:11:05 +00:00
special Reimplement constructor declarator parsing to cope with template-ids 2010-01-13 17:31:36 +00:00
temp Improve the reporting of non-viable overload candidates by noting the reason 2010-01-13 00:25:19 +00:00