brintos

brintos / llvm-project-archived public Read only

0
0
Text · 681 B · f644235 Raw
22 lines · cpp
1// RUN: %check_clang_tidy -std=cl2.0 %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu -I %S -x cl2 3#pragma OPENCL EXTENSION cl_khr_fp16 : enable4 5void floating_point_half_suffix() {6  static half v0 = 0x0p0; // no literal7 8  // half9 10  static half v2 = 1.h;11  // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: floating point literal has suffix 'h', which is not uppercase12  // CHECK-HIXES: static half v2 = 1.H;13 14  static half v3 = 1.e0h;15  // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: floating point literal has suffix 'h', which is not uppercase16  // CHECK-HIXES: static half v3 = 1.e0H;17 18  static half v4 = 1.H; // OK.19 20  static half v5 = 1.e0H; // OK.21}22