Oleg Smolsky via llvm-dev
2021-Dec-02 23:40 UTC
[llvm-dev] clang-tidy: fixing member vars across files
An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211202/0c414cb2/attachment.html>
Oleg Smolsky via llvm-dev
2021-Dec-03 00:16 UTC
[llvm-dev] clang-tidy: fixing member vars across files
...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. On Thu, Dec 2, 2021 at 3:40 PM Oleg Smolsky <osmolsky at netskope.com> wrote:> 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. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211202/96a97956/attachment.html>