[cfe-dev] Objective-C tidy up
csdavec at swansea.ac.uk
Wed Jun 18 03:22:12 PDT 2008
On 17 Jun 2008, at 19:06, Chris Lattner wrote:
> On Jun 16, 2008, at 7:23 AM, David Chisnall wrote:
>>> It would probably be useful to grep for other uses of VarDecl and
>>> ParamVarDecl to see if the code applies to self as well. There may
>>> be other codepaths not being exercised by the testsuite.
>> I've made ImplicitParamDecl a subclass of VarDecl instead of
>> ValueDecl. It's not the ideal solution, but it does work. The
>> ideal solution would be to rearrange the hierarchy around VarDecl
>> and stop implicit or explicit param decls from being subclasses of
>> this, but it will require quite invasive changes in a lot of the
> Applied, thanks!
Great! Now I need to resolve all of the conflicts this has caused
with my other changes and hopefully I'll have the next instalment for
you this afternoon.
> Please add some comments above the ImplicitParamDecl class indicating
> what it is used for. It would also be nice to sink this down the
> class hierarchy, working with Ted as appropriate to identify the
> changes to the checker that are needed.
>> I now get some warnings from clang that this file doesn't appear to
>> be expecting but, looking at the code, they all appear to be
>> Warnings seen but not expected:
>> Line 1596: [CHECKER] Argument to 'NSString' method 'compare:'
>> cannot be nil.
>> Line 1600: [CHECKER] Argument to 'NSString' method
>> 'caseInsensitiveCompare:' cannot be nil.
>> Line 1604: [CHECKER] Argument to 'NSString' method
>> 'compare:options:' cannot be nil.
>> Line 1608: [CHECKER] Argument to 'NSString' method
>> 'compare:options:range:' cannot be nil.
>> Line 1612: [CHECKER] Argument to 'NSString' method
>> 'compare:options:range:locale:' cannot be nil.
>> Line 1615: [CHECKER] Argument to 'NSString' method
>> 'componentsSeparatedByCharactersInSet:' cannot be nil.
>> Line 1622: [CHECKER] Object allocated on line 1618 and stored into
>> 's4' is no longer referenced after this point and has a retain count
>> of +1 (object leaked).
>> Line 1635: [CHECKER] Reference-counted object is used after it is
> Where are you seeing this? make test passes for me. Thanks a lot
I'm not on Darwin, so these tests aren't run when I do make test - I
just ran the .mi file you sent and got these. Possibly this file is
generated from an older version of the .m?
More information about the cfe-dev