annotate clang/test/Frontend/fixed_point_errors.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -x c++ %s -verify
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -x c++ -ffixed-point %s -verify
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Name namgling is not provided for fixed point types in c++
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 _Accum accum; // expected-error{{unknown type name '_Accum'}}
anatofuz
parents:
diff changeset
7 _Fract fract; // expected-error{{unknown type name '_Fract'}}
anatofuz
parents:
diff changeset
8 _Sat _Accum sat_accum; // expected-error{{unknown type name '_Sat'}}
anatofuz
parents:
diff changeset
9 // expected-error@-1{{expected ';' after top level declarator}}
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 int accum_int = 10k; // expected-error{{invalid suffix 'k' on integer constant}}
anatofuz
parents:
diff changeset
12 int fract_int = 10r; // expected-error{{invalid suffix 'r' on integer constant}}
anatofuz
parents:
diff changeset
13 float accum_flt = 10.0k; // expected-error{{invalid suffix 'k' on floating constant}}
anatofuz
parents:
diff changeset
14 float fract_flt = 10.0r; // expected-error{{invalid suffix 'r' on floating constant}}