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

Félix-Antoine Constantin via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 15:07:53 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>( )
----------------
felix642 wrote:

I agree with you, like I've mentionned :

> Since both suggestions are overlapping clang-tidy refuses to apply them [...]

This is probably the reason why they are currently not using `CHECK-FIXES`. It would be a good idea to update the tests to use `CHECK-FIXES` but we would probably need to remove one of the FIX-IT for it to work.


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


More information about the cfe-commits mailing list