Skip to content

Commit 9e48a49

Browse files
committed
chore(test): add test for bfloat literal suffix support
1 parent 3abe5e7 commit 9e48a49

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
2+
__bf16 a = 1.b; // expected-error{{invalid suffix 'b' on floating constant}}
3+
__bf16 b = 1.bf; // expected-error{{invalid suffix 'bf' on floating constant}}
4+
__bf16 c = 1.bf166; // expected-error{{invalid suffix 'bf166' on floating constant}}
5+
__bf16 d = 1.bf1; // expected-error{{invalid suffix 'bf1' on floating constant}}
6+
7+
__bf16 e = 1.B; // expected-error{{invalid suffix 'B' on floating constant}}
8+
__bf16 f = 1.BF; // expected-error{{invalid suffix 'BF' on floating constant}}
9+
__bf16 g = 1.BF166; // expected-error{{invalid suffix 'BF166' on floating constant}}
10+
__bf16 h = 1.BF1; // expected-error{{invalid suffix 'BF1' on floating constant}}
11+
12+
__bf16 i = 1.bf16; // expect-success
13+
__bf16 j = 1.BF16; // expect-success

0 commit comments

Comments
 (0)