[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 20 06:35:43 PDT 2024


================
@@ -342,31 +342,33 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) {
 
     if (DenominatorSize > CharUnits::Zero() &&
         !NumeratorSize.isMultipleOf(DenominatorSize)) {
-      diag(E->getOperatorLoc(), "suspicious usage of 'sizeof(...)/sizeof(...)';"
+      diag(E->getOperatorLoc(), "suspicious usage of 'sizeof(...)/sizeof(...)':"
----------------
NagyDonat wrote:

I kept "usage of" and the apostrophes to be consistent with the rest of the messages emitted by this checker. If you think that this is important, it would be possible to extend the scope of this commit to apply these changes in all the other messages.

https://github.com/llvm/llvm-project/pull/95550


More information about the cfe-commits mailing list