[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 05:49:48 PST 2022


cor3ntin added inline comments.


================
Comment at: clang/test/SemaCXX/warn-self-move.cpp:20-21
   using std::move;
-  x = move(x);  // expected-warning{{explicitly moving}}
+  x = move(x); // expected-warning{{explicitly moving}} \
+                   expected-warning {{unqualified call to std::move}}
 }
----------------
cjdb wrote:
> Rationale: there's less mental gymnastics when backslashes aren't involved.
I think this is unusual so I'd like @aaron.ballman 's opinion - I think to recall he asked me to make the exact opposite change


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