brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · d5686a4 Raw
24 lines · c
1/* RUN: %clang_cc1 -std=c89 -Wno-deprecated-non-prototype -ast-dump -o -  %s | FileCheck %s2   RUN: %clang_cc1 -std=c99 -Wno-deprecated-non-prototype -ast-dump -o -  %s | FileCheck %s3   RUN: %clang_cc1 -std=c11 -Wno-deprecated-non-prototype -ast-dump -o -  %s | FileCheck %s4   RUN: %clang_cc1 -std=c17 -Wno-deprecated-non-prototype -ast-dump -o -  %s | FileCheck %s5 */6 7/* WG14 DR206: yes8 * Default argument conversion of float _Complex9 */10void dr206_unprototyped();11void dr206(void) {12  /* Ensure that _Complex float is not promoted to _Complex double but is13   * instead passed directly without a type conversion.14   */15  _Complex float f = 1.2f;16  dr206_unprototyped(f);17  // CHECK: CallExpr 0x{{.*}} <line:16:3, col:23> 'void'18  // CHECK-NEXT: ImplicitCastExpr 0x{{.*}} <col:3> 'void (*)()' <FunctionToPointerDecay>19  // CHECK-NEXT: DeclRefExpr 0x{{.*}} <col:3> 'void ()' Function 0x{{.*}} 'dr206_unprototyped' 'void ()'20  // CHECK-NEXT: ImplicitCastExpr 0x{{.*}} <col:22> '_Complex float' <LValueToRValue>21  // CHECK-NEXT: DeclRefExpr 0x{{.*}} <col:22> '_Complex float' lvalue Var 0x{{.*}} 'f' '_Complex float'22}23 24