[cfe-dev] Trouble with MSVC again

Douglas Gregor dgregor at apple.com
Mon May 10 11:09:36 PDT 2010


On May 10, 2010, at 9:19 AM, Dimitry Andric wrote:

> On 2010-05-10 17:09, Olaf Krzikalla wrote:
>> just now I stumbled over a MSVC issue which I first considered being a 
>> reincarnation of a bug we've discussed here about a year ago (Jun/26/2009).
>> The troublesome lines are in Action.h:127
>> 
>>    FullExprArg &operator=(const FullExprArg& Other) {
>>      Expr = ExprArg(move(const_cast<FullExprArg&>(Other).Expr));
>>      return *this;
>>    }
> 
> I kludged around this using:
> 
> Index: tools/clang/include/clang/Parse/Action.h
> ===================================================================
> --- tools/clang/include/clang/Parse/Action.h	(revision 103401)
> +++ tools/clang/include/clang/Parse/Action.h	(working copy)
> @@ -114,7 +114,7 @@ class Action : public ActionBase {
>       : Expr(move(const_cast<FullExprArg&>(Other).Expr)) {}
> 
>     FullExprArg &operator=(const FullExprArg& Other) {
> -      Expr = ExprArg(move(const_cast<FullExprArg&>(Other).Expr));
> +      Expr.operator=(move(const_cast<FullExprArg&>(Other).Expr));
>       return *this;
>     }
> 
> 
> which MSVC does accept.

I just committed this fix. Sorry for the breakage!

	- Doug





More information about the cfe-dev mailing list