================
@@ -1,15 +1,29 @@
-// RUN: %check_clang_tidy -std=c99 %s 
bugprone-implicit-widening-of-multiplication-result %t -- -- -target 
x86_64-unknown-unknown -x c
-// RUN: %check_clang_tidy %s 
bugprone-implicit-widening-of-multiplication-result %t -- -- -target 
x86_64-unknown-unknown -x c++
+// RUN: %check_clang_tidy -check-suffixes=ALL,C -std=c99 %s 
bugprone-implicit-widening-of-multiplication-result %t -- -- -target 
x86_64-unknown-unknown -x c
+// RUN: %check_clang_tidy -check-suffixes=ALL,CXX %s 
bugprone-implicit-widening-of-multiplication-result %t -- -- -target 
x86_64-unknown-unknown -x c++
 
 long t0(short a, int b) {
   return a * b;
-  // CHECK-NOTES: :[[@LINE-1]]:10: warning: performing an implicit widening 
conversion to type 'long' of a multiplication performed in type 'int'
----------------
zeyi2 wrote:

Could you also add a new test case like:

```c
long f(unsigned short a, unsigned short b) {
  return a * b;
}
```

This would check the `Ty->isSignedIntegerType()` branch.

https://github.com/llvm/llvm-project/pull/214501
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to