Skip to content

Commit 3cc63e9

Browse files
committed
add more bf16 literal suffix tests
1 parent 33d9adb commit 3cc63e9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

clang/test/Lexer/bfloat-literal.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,20 @@ __bf16 h = 1.BF1; // expected-error{{invalid suffix 'BF1' on floating constant}}
1111

1212
__bf16 i = 1.bf16; // expect-success
1313
__bf16 j = 1.BF16; // expect-success
14+
15+
__bf16 k = 1B; // expected-error{{invalid digit 'B' in decimal constant}}
16+
__bf16 l = 1BF; // expected-error{{invalid digit 'B' in decimal constant}}
17+
__bf16 m = 1BF166; // expected-error{{invalid digit 'B' in decimal constant}}
18+
__bf16 n = 1BF1; // expected-error{{invalid digit 'B' in decimal constant}}
19+
20+
__bf16 o = 1b; // expected-error{{invalid digit 'b' in decimal constant}}
21+
__bf16 p = 1bf; // expected-error{{invalid digit 'b' in decimal constant}}
22+
__bf16 q = 1bf166; // expected-error{{invalid digit 'b' in decimal constant}}
23+
__bf16 r = 1bf1; // expected-error{{invalid digit 'b' in decimal constant}}
24+
25+
__bf16 s = 1bf16; // expected-error{{invalid digit 'b' in decimal constant}}
26+
__bf16 t = 1BF16; // expected-error{{invalid digit 'B' in decimal constant}}
27+
28+
__bf16 u = 1.bf16F16; // expected-error{{invalid suffix 'bf16F16' on floating constant}}
29+
__bf16 v = 1.BF16f16; // expected-error{{invalid suffix 'BF16f16' on floating constant}}
30+
__bf16 w = 1.F16bf16; // expected-error{{invalid suffix 'F16bf16' on floating constant}}

0 commit comments

Comments
 (0)