[PATCH] D119670: [clang] Warn on unqualified calls to std::move and std::forward

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 24 11:06:09 PST 2022


cor3ntin added a comment.

In D119670#3343726 <https://reviews.llvm.org/D119670#3343726>, @erichkeane wrote:

> In D119670#3343718 <https://reviews.llvm.org/D119670#3343718>, @rnk wrote:
>
>> This broke our libc++ -Werror build:
>>
>>   llvm-project/libcxx/src/filesystem/directory_iterator.cpp:107:57: error: unqualified call to std::move [-Werror,-Wunqualified-std-cast-call]
>>                                                   __root_(move(other.__root_)),
>>                                                           ^
>>                                                           std::
>>
>> We can disable the warning, but we look forward to an upstream resolution.
>
> This is exactly the kind of case that this warning is designed to catch.  Unqualified calls std::move is what we're trying to catch.

The issue is that for its own tests, libc++ headers are not considered system headers. we should fix libc++. I can do that later today. I though @Quuxplusone did.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119670/new/

https://reviews.llvm.org/D119670



More information about the cfe-commits mailing list