================ @@ -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(...)':" " numerator is not a multiple of denominator") << E->getLHS()->getSourceRange() << E->getRHS()->getSourceRange(); } else if (ElementSize > CharUnits::Zero() && DenominatorSize > CharUnits::Zero() && ElementSize != DenominatorSize) { - diag(E->getOperatorLoc(), "suspicious usage of 'sizeof(...)/sizeof(...)';" - " numerator is not a multiple of denominator") + diag(E->getOperatorLoc(), + "suspicious usage of 'sizeof(array)/sizeof(...)':" ---------------- NagyDonat wrote:
It would be slightly better in isolation, but all the other diagnostics look like e.g. `suspicious usage of 'sizeof(..., ...)'` or `suspicious usage of 'sizeof(this)'; did you mean 'sizeof(*this)'` so for the sake of consistency I'd like to leave this aspect of the messages unchanged. https://github.com/llvm/llvm-project/pull/95550 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits