[clang-tools-extra] [clang-tidy] Invalid Fix-It generated for implicit-widening-multiplication-result (PR #76315)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 14:08:04 PST 2024


================
@@ -18,7 +18,7 @@ char *t0(char *base, int a, int b) {
   // CHECK-NOTES-CXX:                  static_cast<ptrdiff_t>( )
   // CHECK-NOTES-ALL: :[[@LINE-5]]:17: note: perform multiplication in a wider type
   // CHECK-NOTES-C:                    (ptrdiff_t)
-  // CHECK-NOTES-CXX:                  static_cast<ptrdiff_t>()
+  // CHECK-NOTES-CXX:                  static_cast<ptrdiff_t>( )
----------------
PiotrZSL wrote:

NOTE: This is legacy issue and shoudn't be fixed under this PR, but all those checks with CHECK-NOTES looks invalid. We should use CHECK-MESSAGES and CHECK-FIXES, in that case we could verify that fixed line after applying fix looks correctly instead of checking clang-tidy output.

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


More information about the cfe-commits mailing list