diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
commit | bb1e3bc1e0be2b8f891db46457a8943451bf4d8b (patch) | |
tree | 1e68501209c9133fbda8d45171e59f8d6f12dd55 /test/SemaCXX/enum.cpp | |
parent | 77212133072dc40f070a280af8217032f55a9eb4 (diff) | |
download | FreeBSD-src-bb1e3bc1e0be2b8f891db46457a8943451bf4d8b.zip FreeBSD-src-bb1e3bc1e0be2b8f891db46457a8943451bf4d8b.tar.gz |
Updaet clang to 92395.
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r-- | test/SemaCXX/enum.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp index 3315de0..f1b02f5 100644 --- a/test/SemaCXX/enum.cpp +++ b/test/SemaCXX/enum.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++98 -verify -triple x86_64-apple-darwin %s enum E { Val1, @@ -42,26 +42,17 @@ namespace test1 { template <class A> struct is_same<A,A> { static const int value = 1; }; enum enum0 { v0 }; - int test0[is_same<typeof(+v0), int>::value]; + int test0[is_same<__typeof(+v0), int>::value]; enum enum1 { v1 = __INT_MAX__ }; - int test1[is_same<typeof(+v1), int>::value]; + int test1[is_same<__typeof(+v1), int>::value]; enum enum2 { v2 = __INT_MAX__ * 2U }; - int test2[is_same<typeof(+v2), unsigned int>::value]; + int test2[is_same<__typeof(+v2), unsigned int>::value]; - // This kindof assumes that 'int' is smaller than 'long long'. -#if defined(__LP64__) - enum enum3 { v3 = __LONG_LONG_MAX__ }; - int test3[is_same<typeof(+v3), long>::value]; + enum enum3 { v3 = __LONG_MAX__ }; + int test3[is_same<__typeof(+v3), long>::value]; - enum enum4 { v4 = __LONG_LONG_MAX__ * 2ULL }; - int test4[is_same<typeof(+v4), unsigned long>::value]; -#else - enum enum3 { v3 = __LONG_LONG_MAX__ }; - int test3[is_same<typeof(+v3), long long>::value]; - - enum enum4 { v4 = __LONG_LONG_MAX__ * 2ULL }; - int test4[is_same<typeof(+v4), unsigned long long>::value]; -#endif + enum enum4 { v4 = __LONG_MAX__ * 2UL }; + int test4[is_same<__typeof(+v4), unsigned long>::value]; } |