r220695 - Start adding the infrastructure for handling TypoExprs.

Hans Wennborg hans at chromium.org
Mon Oct 27 15:01:32 PDT 2014


On Mon, Oct 27, 2014 at 2:46 PM, Kaelyn Takata <rikka at google.com> wrote:
> Yes, the patch seems reasonable. I take it just defining the move
> constructor and assignment operator as default (e.g.
> "TypoExprState(TypoExprState&& other) = default;" isn't sufficient to make
> MSVC happy?

default? "undeclared identifier" :)

I've committed my patch in r220723.


> On Mon, Oct 27, 2014 at 2:32 PM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> On Mon, Oct 27, 2014 at 11:07 AM, Kaelyn Takata <rikka at google.com> wrote:
>> > Author: rikka
>> > Date: Mon Oct 27 13:07:37 2014
>> > New Revision: 220695
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=220695&view=rev
>> > Log:
>> > Start adding the infrastructure for handling TypoExprs.
>>
>> The Windows bots are confused about this, e.g.:
>>
>> http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11221/steps/build_clang_tools/logs/stdio
>>
>> [...]
>>
>> > +  struct TypoExprState {
>> > +    std::unique_ptr<TypoCorrectionConsumer> Consumer;
>>
>> It seems MSVC is trying to synthesize a copy constructor for this,
>> which tries to copy the unique_ptr  member and fails. When this comes
>> up it's usually because the object is being moved and MSVC doesn't
>> realize it should synthesize a move constructor.
>>
>> One way to fix this is to define the move constructor and assignment
>> operator ourselves. Does the attached patch look reasonable?



More information about the cfe-commits mailing list