[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

Alexander Lanin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 26 16:06:28 PST 2020


AlexanderLanin added a comment.

In D54943#1815772 <https://reviews.llvm.org/D54943#1815772>, @0x8000-0000 wrote:

> This generated 56 "const const" declarations, of which 25 were triple const!


I've tried this on ccache (326 fixes, nice!), but some came out as 'const const'.
At least in my case I traced it back to having `src/......` and `./src/......` within the fixes.yml file.
On first glance these result from having `./src` as an include directory.

After replacing `-I./` with `-I` within compile_commands.json I'm not getting `const const` anymore.

Not sure who is at fault here / who should fix it.
But at least in the trivial case of ./ I feel clang-tidy should fix it when it writes the yml files?!

This surfaces here simply due to the shire number of files with fixes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54943/new/

https://reviews.llvm.org/D54943





More information about the cfe-commits mailing list