[PATCH] D158152: [clang-tidy]mark record initList as non-const param

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 21 07:50:17 PDT 2023


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

LGTM, but note that type aliases may not work properly, but that more a legacy issue that got source in line 104, simply because we should use canonical type there.



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/non-const-parameter.cpp:235
+  // CHECK-FIXES: {{^}}void recordInitListDiag(const int *x) {{{$}}
+  XYConst xy = {x};
+}
----------------
Add a test with XYConst  hidden behind typedef.
like
```typedef XYConst XYConstTypedef;
XYConstTypedef yz = {x};
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158152



More information about the cfe-commits mailing list