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

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 04:13:35 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(...)':"
----------------
whisperity wrote:

```suggestion
      diag(E->getOperatorLoc(), "suspicious sizeof(...)/sizeof(...):"
```

And then consistently everywhere.

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


More information about the cfe-commits mailing list