1 // RUN: %check_clang_tidy -std=c99 %s bugprone-implicit-widening-of-multiplication-result %t -- -- -target x86_64-unknown-unknown -x c
2 // RUN: %check_clang_tidy %s bugprone-implicit-widening-of-multiplication-result %t -- -- -target x86_64-unknown-unknown -x c++
3 
4 _ExtInt(64) t0(_ExtInt(32) a, _ExtInt(32) b) {
5   return a * b;
6   // CHECK-NOTES: :[[@LINE-1]]:10: warning: performing an implicit widening conversion to type '_ExtInt(64)' of a multiplication performed in type '_ExtInt(32)'
7   // CHECK-NOTES: :[[@LINE-2]]:10: note: make conversion explicit to silence this warning
8   // CHECK-NOTES: :[[@LINE-3]]:10: note: perform multiplication in a wider type
9 }
10 unsigned _ExtInt(64) t1(_ExtInt(32) a, _ExtInt(32) b) {
11   return a * b;
12   // CHECK-NOTES: :[[@LINE-1]]:10: warning: performing an implicit widening conversion to type 'unsigned _ExtInt(64)' of a multiplication performed in type '_ExtInt(32)'
13   // CHECK-NOTES: :[[@LINE-2]]:10: note: make conversion explicit to silence this warning
14   // CHECK-NOTES: :[[@LINE-3]]:10: note: perform multiplication in a wider type
15 }
16 _ExtInt(64) t2(unsigned _ExtInt(32) a, unsigned _ExtInt(32) b) {
17   return a * b;
18   // CHECK-NOTES: :[[@LINE-1]]:10:  warning: performing an implicit widening conversion to type '_ExtInt(64)' of a multiplication performed in type 'unsigned _ExtInt(32)'
19   // CHECK-NOTES: :[[@LINE-2]]:10: note: make conversion explicit to silence this warning
20   // CHECK-NOTES: :[[@LINE-3]]:10: note: perform multiplication in a wider type
21 }
22