[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / AST / variadic-promotion.c
blob41c7fec8d7943e951e8a5e3d255dc2dbd3c9ff84
1 // Test without serialization:
2 // RUN: %clang_cc1 -ast-dump %s | FileCheck %s
3 //
4 // Test with serialization:
5 // RUN: %clang_cc1 -emit-pch -o %t %s
6 // RUN: %clang_cc1 -x c -include-pch %t -ast-dump-all /dev/null \
7 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
8 // RUN: | FileCheck %s
10 void variadic(int, ...);
12 void test_floating_promotion(__fp16 *f16, float f32, double f64) {
13 variadic(3, *f16, f32, f64);
15 // CHECK: ImplicitCastExpr {{.*}} 'double' <FloatingCast>
16 // CHECK-NEXT: '__fp16'
18 // CHECK: ImplicitCastExpr {{.*}} 'double' <FloatingCast>
19 // CHECK-NEXT: 'float'