[cfe-commits] r60906 - in /cfe/trunk: include/clang/Parse/Parser.h

Sebastian Redl sebastian.redl at getdesigned.at
Fri Dec 12 04:41:07 PST 2008


On Thu, 11 Dec 2008 20:31:42 -0800, Chris Lattner <clattner at apple.com>
wrote:
> On Dec 11, 2008, at 2:52 PM, Sebastian Redl wrote:
> 
>>   //
>>   switch (Tok.getKind()) {
>>   default:
>> -    return Diag(Tok, diag::err_expected_unqualified_id);
>> +    return ExprError(Diag(Tok, diag::err_expected_unqualified_id));
> 
> Would it be possible to change Diag somehow to eliminate the need for  
> the explicit ExprError syntax?
> 

I've sat and thought about this for 20 minutes before deciding that no, it
isn't possible. One of the shortcomings of the move emulation, I'm afraid:
the return value must already be a temporary of the return type; getting it
from implicit conversion then blocks the implicit conversion to the mover
type.

Sebastian



More information about the cfe-commits mailing list