AlexanderLanin added a comment. Thanks for the feedback. As I'm new to this I cannot say whether checking only the file in question fits better with clang-tidy’s policy or not. Also, I’m not sure about ODR. Of course, it’s a possibility, but isn’t the programmer responsible for that? This will be more of an issue as soon as this check provides a Fix-It solution.
As for the other part, I've checked some guidelines (without any order or selection process) MISRA C++: Don’t use `#define`, use `const` variables; Also don’t do math on enums CppCoreGuidelines: Don’t use `#define`, use `constexpr` variables SEI CERT C++: No mention of `#define` as far as I can tell JSF AV C++: Don’t use `#define`, use `const` variables HIC++: Don’t use `#define`, use `const` objects (reference to JSF AV C++ and MISRA C++) So basically they're all the same. The only question is `const` vs `constexpr` https://reviews.llvm.org/D29692 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits