hanchenye-llvm-project/clang/test/CXX
Richard Smith fd555f6b1f Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a
function call (or a comma expression with a function call on its right-hand
side), possibly parenthesized, then the return type is not required to be
complete and a temporary is not bound. Other subexpressions inside a decltype
expression do not get this treatment.

This is implemented by deferring the relevant checks for all calls immediately
within a decltype expression, then, when the expression is fully-parsed,
checking the relevant constraints and stripping off any top-level temporary
binding.

Deferring the completion of the return type exposed a bug in overload
resolution where completion of the argument types was not attempted, which
is also fixed by this change.

llvm-svn: 151117
2012-02-22 02:04:18 +00:00
..
basic Make RequireLiteralType work correctly with incomplete array types. PR12037. 2012-02-20 23:58:14 +00:00
class Make sure we still reject static data members in anonymous unions in C++11. 2012-02-16 21:23:54 +00:00
class.access Modify how the -verify flag works. Currently, the verification string and 2011-12-15 00:38:15 +00:00
class.derived Modify how the -verify flag works. Currently, the verification string and 2011-12-15 00:38:15 +00:00
conv Compute the promoted integer type of fixed-width enums correctly. Found by inspection. 2011-10-26 07:38:19 +00:00
dcl.dcl Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a 2012-02-22 02:04:18 +00:00
dcl.decl When overload resolution picks an implicitly-deleted special member 2012-02-15 19:33:52 +00:00
except In C++11 mode, when an integral constant expression is desired and we have a 2012-02-04 09:53:13 +00:00
expr In the conflict between C++11 [expr.prim.general]p4, which declares 2012-02-21 22:51:27 +00:00
lex Update all tests other than Driver/std.cpp to use -std=c++11 rather than 2011-10-13 22:29:44 +00:00
over Modify how the -verify flag works. Currently, the verification string and 2011-12-15 00:38:15 +00:00
special When overload resolution picks an implicitly-deleted special member 2012-02-15 19:33:52 +00:00
stmt.stmt Support decltype as a simple-type-specifier. 2012-01-24 05:47:35 +00:00
temp Represent C++ direct initializers as ParenListExprs before semantic analysis 2012-02-11 23:51:47 +00:00