[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

Haocong Lu via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 18:02:22 PST 2024


================
@@ -18,3 +18,8 @@ void test_floating_promotion(__fp16 *f16, float f32, double f64) {
 // CHECK: ImplicitCastExpr {{.*}} 'double' <FloatingCast>
 // CHECK-NEXT: 'float'
 }
+
+void test_Float16_no_default_promotion(_Float16 f16) {
+  variadic(1, f16);
+// CHECK-NOT: ImplicitCastExpr {{.*}} 'double' <FloatingCast>
+}
----------------
Luhaocong wrote:

Done

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


More information about the cfe-commits mailing list