| Issue |
71583
|
| Summary |
[FR] Add option for clang-tidy check "cppcoreguidelines-init-variables" to use initializer lists
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
FalcoGer
|
I'd like an option for clang tidy's `cppcoreguidelines-init-variables` checker that provides fixes with an initializer list when possible.
Example:
```c++
int main()
{
// int var;
// ~~~
// ^ Variable 'var' is not initialized (fix available) (clang-tidy cppcoreguidelines-init-variables)
// Current fix:
// int var = 0;
// Desired fix:
int var{};
// alternatively (maybe another setting for that extra option?)
// int var{0};
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs