From 46348d93a09ac80cddd7a407b98a8320cfc18abc Mon Sep 17 00:00:00 2001 From: Jordan Rose <jordan_rose@apple.com> Date: Thu, 20 Mar 2014 15:54:16 +0000 Subject: [PATCH] Remove wchar_t* buffer from scanf format fix-it test. Amends r204300 to not try to test fixing a wchar_t* to "%ls", which we don't do correctly anyway. In C mode, wchar_t is just a typedef for a normal primitive integer type, not a distinct type like it is in C++. To make this work correctly, we'll need to look for the wchar_t typedef, not just the builtin type. Should fix the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204349 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/format-strings-fixit.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/Sema/format-strings-fixit.c b/test/Sema/format-strings-fixit.c index 341288366a5..b982eb45e5f 100644 --- a/test/Sema/format-strings-fixit.c +++ b/test/Sema/format-strings-fixit.c @@ -101,7 +101,6 @@ int scanf(char const *, ...); void test2(int intSAParm[static 2]) { char str[100]; char *vstr = "abc"; - wchar_t wstr[100]; short shortVar; unsigned short uShortVar; int intVar; @@ -124,8 +123,6 @@ void test2(int intSAParm[static 2]) { scanf("%lf", str); scanf("%lf", vstr); scanf("%ls", str); - scanf("%f", wstr); // FIXME: wchar_t should resolve to %ls, not %d. - scanf("%s", wstr); // FIXME: wchar_t should resolve to %ls, not %d. scanf("%ls", str); // Some integer types. @@ -225,8 +222,6 @@ void test2(int intSAParm[static 2]) { // CHECK: scanf("%99s", str); // CHECK: scanf("%s", vstr); // CHECK: scanf("%99s", str); -// CHECK: scanf("{{%d|%hu}}", wstr); -// CHECK: scanf("{{%d|%hu}}", wstr); // CHECK: scanf("%99s", str); // CHECK: scanf("%hd", &shortVar); // CHECK: scanf("%hu", &uShortVar); -- GitLab