Commit Graph

11 Commits

Author SHA1 Message Date
Fariborz Jahanian c080a333ce Method declaration and its implementation must match in all their types.
Previously, compiler warned only if it was unsafe if types
did not match. Fixes // rdar: //7933061

llvm-svn: 115683
2010-10-05 21:02:11 +00:00
Fariborz Jahanian 5981b04718 Clang missing warning about conflicting declaration vs. definition
for variable arguments list methods. (radar 8006060).

llvm-svn: 104407
2010-05-21 23:28:58 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Fariborz Jahanian 0399c1c9c0 Change tests to use clang -cc1...
llvm-svn: 91297
2009-12-14 17:36:25 +00:00
Mike Stump 753d120975 Prep for new warning.
llvm-svn: 76709
2009-07-22 00:43:08 +00:00
Fariborz Jahanian 0c20bddc41 Don't warn if result/argument type of an implemented
method is a qualified id which conforms to the matching type
of its method declaration.

llvm-svn: 71817
2009-05-14 23:52:54 +00:00
Chris Lattner dac168d2a6 Fix rdar://6771034: don't warn on use of forward declared protocol in protocol
list of another protocol definition.  This warning is very noisy and GCC doesn't
produce it so existing code doesn't expect it.

llvm-svn: 68894
2009-04-12 08:43:13 +00:00
Chris Lattner 67f35b051b improve the 'conflicting types' diagnostics to include correct location info, now
that it is plumbed through Sema.  On a file from growl, we used to emit:

t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:1: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

now we produce:

t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
                                                      ^
t.mi:105280:45: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
                                            ^

We still don't have proper loc info for properties, hence the FIXME.

rdar://6782494

llvm-svn: 68879
2009-04-11 19:58:42 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Steve Naroff c68cfcfd03 The "real" fix for <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && "unexpected type"), function mergeTypes,
Commit r60845 was premature.

llvm-svn: 60852
2008-12-10 22:14:21 +00:00
Steve Naroff 13ac125edf Fix <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && "unexpected type"), function mergeTypes,
llvm-svn: 60845
2008-12-10 20:07:25 +00:00