Reputation: 3134
CLion has a nice integration of Clang-Tidy, but the default configuration is targeted to modern C++. The compiler I'm stuck with however is C++03 only and all the advices of Clang-Tidy on modernizing my code just continue to rub in the fact that my compiler is very old.
I have identified already a couple of checks that must be deactivated for C++03, but this list is surely far from complete:
boost-use-to-string
modernize-use-*
checksDoes anybody have compiled a list of checks to deactivate for C++03?
Upvotes: 3
Views: 916
Reputation: 11
Unfortunately, there is no standard way to disable all irrelevant Clang-Tidy checks for old compilers in CLion. Clang-Tidy was initially designed to modernize whole code base to new C++ standards and many checks ignore fact with old standards.
But you can easily setup and disable all irrelevant checks for your project right from context-menu: disable Clang-Tidy from context-menu
By this, you can disable particular check (e.g. modernize-use-nullptr
), whole group (e.g. all modernize-*
inspections) or you can suppress Clang-Tidy for current line by inserting //NOLINT
comment at the end of line.
Hope it helps you!
Upvotes: 1