The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
26.68k
stars
10.93k
forks
source link
clang-apply-replacements doesn't delete commas left by modernize-use-default-member-init #34399
Open
llvmbot opened 6 years ago
Extended Description
clang-apply-replacements leaves behind commas when it removes multiple member initializers, whereas clang-tidy cleans them up.
This file: struct S { S() : a(false), b(false) {} bool a; bool b; };
is transformed to this: struct S { S() : , {} bool a = false; bool b = false; };
When running this command: $llvm_src/tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -p ../ -clang-tidy-binary $llvm_out/bin/clang-tidy -clang-apply-replacements-binary $llvm_out/bin/clang-apply-replacements -fix