[PATCH 1/4] environ-selftests: Ignore -Wself-move warning

Simon Marchi simon.marchi@polymtl.ca
Wed Jun 21 21:16:00 GMT 2017


On 2017-06-21 22:29, Sergio Durigan Junior wrote:
>> +#ifdef __clang__
>> +#pragma clang diagnostic push
>> +#pragma clang diagnostic ignored "-Wself-move"
>> +#endif /* __clang__ */
>>    env = std::move (env);
>> +#ifdef __clang__
>> +#pragma clang diagnostic pop
>> +#endif /* __clang__ */

> Do you
> think it's worth putting a comment on top, just to explicitly say what
> this is doing?

Forgot to reply to this.  It seemed self-explanatory enough to me that 
ignoring the "self-move" warning just above a blatant self move was 
probably to silence a warning pointing out the self move :).



More information about the Gdb-patches mailing list