[cfe-commits] r163329 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/Sema/warn-unused-function.c

Ted Kremenek kremenek at apple.com
Thu Sep 6 11:07:08 PDT 2012


On Sep 6, 2012, at 10:54 AM, jahanian <fjahanian at apple.com> wrote:

> 
> On Sep 6, 2012, at 10:45 AM, Ted Kremenek wrote:
> 
>> On Sep 6, 2012, at 10:33 AM, jahanian <fjahanian at apple.com> wrote:
>> 
>>> On Sep 6, 2012, at 10:28 AM, Ted Kremenek wrote:
>>> 
>>>> Hi Fariborz,
>>>> 
>>>> I see logic here that special cases for Objective-C categories, but no test case for that bit.  Is that already covered by an existing test?
>>> No, I cut-and-pasted from similar code for other attributes. I will add a test case.
>> 
>> Instead of copy-and-pasting, can we refactor the common logic to go through a common helper function?
> 
> It is a two line of code. I am not sure that it is worse it.
> 

It's conceptually cleaner, and means the next time we need to do this we don't copy-and-paste again.  If we need to ever update the logic, we only need to update it in one place.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120906/537df853/attachment.html>


More information about the cfe-commits mailing list