[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / clang / test / C / drs / dr290.c
blob92b7d77c7468d42f7a1466fcc0a96fb5cda040ea
1 /* RUN: %clang_cc1 -ast-dump %s | FileCheck %s
2 */
4 /* WG14 DR290: no
5 * FLT_EVAL_METHOD and extra precision and/or range
7 * We retain an implicit conversion based on the float eval method being used
8 * instead of dropping it due to the explicit cast. See GH86304 and C23 6.5.5p7.
9 */
11 #pragma clang fp eval_method(double)
12 _Static_assert((float)(123.0F * 2.0F) == (float)246.0F, "");
14 // CHECK: StaticAssertDecl
15 // CHECK-NEXT: ImplicitCastExpr {{.*}} '_Bool' <IntegralToBoolean>
16 // CHECK-NEXT: BinaryOperator {{.*}} 'int' '=='
17 // NB: the following implicit cast is incorrect.
18 // CHECK-NEXT: ImplicitCastExpr {{.*}} 'double' <FloatingCast> FPEvalMethod=1
19 // CHECK-NEXT: CStyleCastExpr {{.*}} 'float' <FloatingCast> FPEvalMethod=1