diff options
author | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | f27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /test/Sema/constant-builtins.c | |
download | FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz |
Import Clang, at r72732.
Diffstat (limited to 'test/Sema/constant-builtins.c')
-rw-r--r-- | test/Sema/constant-builtins.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Sema/constant-builtins.c b/test/Sema/constant-builtins.c new file mode 100644 index 0000000..f8cea33 --- /dev/null +++ b/test/Sema/constant-builtins.c @@ -0,0 +1,24 @@ +// RUN: clang-cc -fsyntax-only %s -verify -pedantic + +// Math stuff + +float g0 = __builtin_huge_val(); +double g1 = __builtin_huge_valf(); +long double g2 = __builtin_huge_vall(); +float g3 = __builtin_inf(); +double g4 = __builtin_inff(); +long double g5 = __builtin_infl(); + +// GCC misc stuff + +extern int f(); + +int h0 = __builtin_types_compatible_p(int,float); +//int h1 = __builtin_choose_expr(1, 10, f()); +//int h2 = __builtin_expect(0, 0); + +short somefunc(); + +short t = __builtin_constant_p(5353) ? 42 : somefunc(); + + |