diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-02 23:21:43 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-02 23:21:43 +0000 |
commit | 687b5df89d4ba91219df578d02087c68c09a0332 (patch) | |
tree | 72ce07514f390ecac3b02890218d448185cd455e /test/Sema/format-strings-int-typedefs.c | |
parent | 3aaeccc597fa49e5b5aa9c197ef699d2c19ec86b (diff) |
Revert r145697 and dependent patch r145702. It added a dependency from
lib/Analysis to lib/Sema which is cyclical.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings-int-typedefs.c')
-rw-r--r-- | test/Sema/format-strings-int-typedefs.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/test/Sema/format-strings-int-typedefs.c b/test/Sema/format-strings-int-typedefs.c deleted file mode 100644 index 2cac9a875d..0000000000 --- a/test/Sema/format-strings-int-typedefs.c +++ /dev/null @@ -1,30 +0,0 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s - -int printf(char const *, ...); - -void test(void) { - // size_t, et al. have not been declared yet, - // so the warning should refer to the builtin types. - printf("%jd", 42.0); // expected-warning {{conversion specifies type 'long long'}} - printf("%ju", 42.0); // expected-warning {{conversion specifies type 'unsigned long long'}} - printf("%zu", 42.0); // expected-warning {{conversion specifies type 'unsigned long'}} - printf("%td", 42.0); // expected-warning {{conversion specifies type 'int'}} - - typedef __typeof(sizeof(int)) size_t; - typedef __INTMAX_TYPE__ intmax_t; - typedef __UINTMAX_TYPE__ uintmax_t; - typedef __PTRDIFF_TYPE__ ptrdiff_t; - - printf("%jd", 42.0); // expected-warning {{conversion specifies type 'intmax_t' (aka 'long long')}} - printf("%ju", 42.0); // expected-warning {{conversion specifies type 'uintmax_t' (aka 'unsigned long long')}} - printf("%zu", 42.0); // expected-warning {{conversion specifies type 'size_t' (aka 'unsigned long')}} - printf("%td", 42.0); // expected-warning {{conversion specifies type 'ptrdiff_t' (aka 'int')}} -} - -void test2(void) { - typedef void *size_t; - - // The typedef for size_t does not match the builtin type, - // so the warning should not refer to it. - printf("%zu", 42.0); // expected-warning {{conversion specifies type 'unsigned long'}} -} |