I'd like an option for clang tidy's cppcoreguidelines-init-variables checker that provides fixes with an initializer list when possible.
Example:
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};
}
I'd like an option for clang tidy's
cppcoreguidelines-init-variables
checker that provides fixes with an initializer list when possible.Example: