[PATCH] D153220: [clang-tidy] Improve `performance-move-const-arg` message when no move constructor is available

André Schackier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 18 04:16:30 PDT 2023


AMS21 added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/performance/move-const-arg.cpp:345
+namespace issue_62550 {
+
+struct NonMoveConstructable {
----------------
PiotrZSL wrote:
> AMS21 wrote:
> > I've tried to add
> > 
> > ```
> > // CHECK-MESSAGES: [[@LINE+1]]:1: note: 'NonMoveConstructable' is not move constructible
> > ```
> > 
> > here. But doing so actually fails the tests and I'm not quite sure why.
> There are 2 ways to deal with this.
> If you use CHECK-MESSAGES, then order of issues is checked, and that why for current notes you may see thing like `@LINE-27`, so you would need to put it into places when its emited.
> Other way is to use CHECK-NOTES, then all warnings are checked out of order.
> So simply I would put those CHECK-MESSAGES, after a warning in lines 256, 372, 384, 387
Ah yes that makes total sense. Thanks for clarifying that :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153220



More information about the cfe-commits mailing list