[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 6 14:32:56 PST 2022


LegalizeAdulthood added a comment.

Aaron, I think your comments are useful and I would be inclined to agree with you if I
was the original author of this check.  I treat the guidelines as just that: guidelines,
not rules.  In the context of clang-tidy I think you're correct that some guidelines
are easily turned into usable diagnostics and a subset of those can become enforceable
rules with suggested fixits.

In this case, the check only issues diagnostics, not fixits.  When the diagnostics result
in many false positives (as per the open bug), then I think it's reasonable to narrow the
scope of the check to omit the false positives.

The worst thing a "guideline" checker can do is to constantly nag you about false
positives.  This trains people to not run the checkers and/or ignore all their complaints.


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

https://reviews.llvm.org/D116386



More information about the cfe-commits mailing list