clang-tidy: fixing member vars across files

Folks, I’ve just realized that while the modernize-use-default-member-init check works for cases where all code (the class declaration, the constructor declaration and definition) is located in one file. That is a minor case in our code base as the absolute majority of code is split between the .h/.cpp files.

  1. Is there something magical that I need to do in order to get clang-tidy refactoring working for that “splic code” case? I have the compile_commands.json file and checks seem to be working… but this particular check does not.

  2. How do I repro the with the LIT tests? Today they just check a single file… can I jam a #include there?

Thanks!
Oleg.

…and the answer to both questions is the -header-filter option. It looks like there are no implicit defaults and so if you are checking code in ./libs/mylib/, that must be expressed with the aforementioned option.

Hopefully this note will be useful to someone.