diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-02-20 22:28:41 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-02-20 22:28:41 +0000 |
commit | 90a7820de7685cec75fcd47e98f0f9623c0f0477 (patch) | |
tree | 6e73d6bf839f1ee9b19e9e50c29e05ca4f1f6b37 | |
parent | d6d864fc0674039d1884e6b8d9089f40370af7d8 (diff) |
Revert "intmax_t is long long on Darwin, not long."
'long' and 'long long' are different for the purposes of mangling.
This caused <rdar://problem/13254874>.
This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175681 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Basic/Targets.cpp | 2 | ||||
-rw-r--r-- | test/FixIt/format-darwin.m | 23 | ||||
-rw-r--r-- | test/Sema/format-strings-size_t.c | 2 |
3 files changed, 1 insertions, 26 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 4e66fe5739..eaf2e7d05e 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -3119,8 +3119,6 @@ class DarwinX86_64TargetInfo : public DarwinTargetInfo<X86_64TargetInfo> { public: DarwinX86_64TargetInfo(const std::string& triple) : DarwinTargetInfo<X86_64TargetInfo>(triple) { - IntMaxType = SignedLongLong; - UIntMaxType = UnsignedLongLong; Int64Type = SignedLongLong; MaxVectorAlign = 256; } diff --git a/test/FixIt/format-darwin.m b/test/FixIt/format-darwin.m index 0724e5760f..cfaac29e90 100644 --- a/test/FixIt/format-darwin.m +++ b/test/FixIt/format-darwin.m @@ -21,7 +21,6 @@ typedef int NSInteger; typedef unsigned int NSUInteger; typedef long SInt32; typedef unsigned long UInt32; - #endif NSInteger getNSInteger(); @@ -211,25 +210,3 @@ void testCapitals() { // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:13-[[@LINE-3]]:14}:"d" // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:11-[[@LINE-4]]:14}:"%D" } - - -// The OS X headers do not always use __INTMAX_TYPE__ and friends. -typedef long long intmax_t; -typedef unsigned long long uintmax_t; -#define INTMAX_C(X) (X ## LL) -#define UINTMAX_C(X) (X ## ULL) - -void testIntMax(intmax_t i, uintmax_t u) { - printf("%d", i); // expected-warning{{format specifies type 'int' but the argument has type 'intmax_t' (aka 'long long')}} - printf("%d", u); // expected-warning{{format specifies type 'int' but the argument has type 'uintmax_t' (aka 'unsigned long long')}} - - // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:11-[[@LINE-3]]:13}:"%jd" - // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:11-[[@LINE-3]]:13}:"%ju" - - printf("%jd", i); // no-warning - printf("%ju", u); // no-warning - - printf("%jd", INTMAX_C(5)); // no-warning - printf("%ju", INTMAX_C(5)); // no-warning -} - diff --git a/test/Sema/format-strings-size_t.c b/test/Sema/format-strings-size_t.c index 5751f8885c..5058a76218 100644 --- a/test/Sema/format-strings-size_t.c +++ b/test/Sema/format-strings-size_t.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s int printf(char const *, ...); |