[LLVMbugs] [Bug 10275] format function attribute isn't checked in Objective-C methods

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 14 13:21:45 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=10275

Eric Christopher <echristo at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |echristo at gmail.com
         Resolution|                            |FIXED

--- Comment #2 from Eric Christopher <echristo at gmail.com> 2012-08-14 15:21:45 CDT ---
Appears fixed in ToT:


[jhereg:~] echristo% /Volumes/Data/builds/build-llvm/Debug+Asserts/bin/clang -g
bar.m -c -Wall
bar.m:15:20: warning: more '%' conversions than data arguments [-Wformat]
    [Test test2:@"%d"];
                  ~^
bar.m:16:24: warning: format specifies type 'int' but the argument has type
      'char *' [-Wformat]
    [Test test2:@"%d", "foo"];
                  ~~   ^~~~~
                  %s
bar.m:18:19: warning: more '%' conversions than data arguments [-Wformat]
    [Test test3:"%d"];
                 ~^
bar.m:19:23: warning: format specifies type 'int' but the argument has type
      'char *' [-Wformat]
    [Test test3:"%d", "foo"];
                 ~~   ^~~~~
                 %s
bar.m:22:17: warning: more '%' conversions than data arguments [-Wformat]
    [t test4:@"%d"];
               ~^
bar.m:23:21: warning: format specifies type 'int' but the argument has type
      'char *' [-Wformat]
    [t test4:@"%d", "foo"];
               ~~   ^~~~~
               %s
bar.m:25:16: warning: more '%' conversions than data arguments [-Wformat]
    [t test5:"%d"];
              ~^
bar.m:26:20: warning: format specifies type 'int' but the argument has type
      'char *' [-Wformat]
    [t test5:"%d", "foo"];
              ~~   ^~~~~
              %s
bar.m:22:6: warning: variable 't' is uninitialized when used here
      [-Wuninitialized]
    [t test4:@"%d"];
     ^
bar.m:21:12: note: initialize the variable 't' to silence this warning
    Test *t;
           ^
            = nil
9 warnings generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list