[all-commits] [llvm/llvm-project] 1c9412: [clang-tidy]mark record initList as non-const param
Congcong Cai via All-commits
all-commits at lists.llvm.org
Mon Aug 21 20:43:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1c9412441b87eb15262fb46dddd53015ff30c42d
https://github.com/llvm/llvm-project/commit/1c9412441b87eb15262fb46dddd53015ff30c42d
Author: Congcong Cai <congcongcai0907 at 163.com>
Date: 2023-08-22 (Tue, 22 Aug 2023)
Changed paths:
M clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/test/clang-tidy/checkers/readability/non-const-parameter.cpp
Log Message:
-----------
[clang-tidy]mark record initList as non-const param
```
struct XY {
int *x;
int *y;
};
void recordInitList(int *x) {
XY xy = {x, nullptr};
}
```
x cannot be const int* becase it in a initialize list which only accept int*
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D158152
More information about the All-commits
mailing list