[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 22 11:20:39 PST 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM with some small nits, but can you also add a release note for the fix? (If there was a bug report for this issue, you should mention that report in the release note and close the bug out.)



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-non-const-parameter.cpp:292
+void lvalueReference(int *p) {
+  // CHECK-MESSAGES-NOT: warning:
+  int &x = *p;
----------------
Please spell out enough of the warning you don't expect to see (in all of these cases) so that someone reading the code knows what you expect to miss.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117090



More information about the cfe-commits mailing list