blob: 997a8ede0ea911fb99fff1504ef1d48aca1337a6 [file] [log] [blame]
Chris Lattner1b9a0792007-12-20 00:26:33 +00001// RUN: clang %s -fsyntax-only -verify
2
3int test1(float a, int b) {
4 return __builtin_isless(a, b);
5}
6int test2(int a, int b) {
7 return __builtin_islessequal(a, b); // expected-error {{floating point type}}
8}
9
10int test3(double a, float b) {
11 return __builtin_isless(a, b);
12}
13int test4(int* a, double b) {
14 return __builtin_islessequal(a, b); // expected-error {{floating point type}}
15}
16
17int test5(float a, long double b) {
18 return __builtin_isless(a, b, b); // expected-error {{too many arguments}}
19}
20int test6(float a, long double b) {
21 return __builtin_islessequal(a); // expected-error {{too few arguments}}
22}
23
24
25#define CFSTR __builtin___CFStringMakeConstantString
26void cfstring() {
27 CFSTR("\242"); // expected-warning {{ CFString literal contains non-ASCII character }}
28 CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }}
29 CFSTR(242); // expected-error {{ CFString literal is not a string constant }} \
30 expected-warning {{incompatible types}}
31 CFSTR("foo", "bar"); // expected-error {{ error: too many arguments to function }}
32}
33