[cfe-commits] r84051 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Edward O'Callaghan eocallaghan at auroraux.org
Tue Oct 13 23:02:57 PDT 2009


G'Day,

As far as I understood from my conversation that went on the
#freebsd-clang channel was that I did not need to add anything else if
we don't need to validate the string format and because we do
__attribute__((__format__(cmn_err, __n, (__n)+1))) which does the same
thing.

Please *do* tell me if I have miss something critical here, I do still
have a small feeling in myself that something else should be added to:
 bool Sema::CheckablePrintfAttr(const FormatAttr *Format, CallExpr *TheCall)
which is in lib/Sema/SemaChecking.cpp , or, at least something along them lines?

I look very much forward to your feedback.

Thanks for your time,
Edward.

2009/10/14 Daniel Dunbar <daniel at zuster.org>:
> Hi Edward,
>
> How is this a "fix"? It just suppresses the error, it doesn't actually
> add support. That seems bad to me?
>
>  - Daniel
>
> On Wed, Oct 14, 2009 at 2:05 AM, Edward O'Callaghan
> <eocallaghan at auroraux.org> wrote:
>> Author: evocallaghan
>> Date: Tue Oct 13 18:05:14 2009
>> New Revision: 84051
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=84051&view=rev
>> Log:
>> Fix for PR 5181.
>>
>> Modified:
>>    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
>>
>> Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=84051&r1=84050&r2=84051&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Tue Oct 13 18:05:14 2009
>> @@ -1246,10 +1246,13 @@
>>   case 5: Supported = !memcmp(Format, "scanf", 5); break;
>>   case 6: Supported = !memcmp(Format, "printf", 6); break;
>>   case 7: Supported = !memcmp(Format, "printf0", 7) ||
>> -                      !memcmp(Format, "strfmon", 7); break;
>> +                      !memcmp(Format, "strfmon", 7) ||
>> +                      !memcmp(Format, "cmn_err", 7); break;
>>   case 8:
>>     Supported = (is_strftime = !memcmp(Format, "strftime", 8)) ||
>>                 (is_NSString = !memcmp(Format, "NSString", 8)) ||
>> +                !memcmp(Format, "vcmn_err", 8) ||
>> +                !memcmp(Format, "zcmn_err", 8) ||
>>                 (is_CFString = !memcmp(Format, "CFString", 8));
>>     break;
>>   }
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>



-- 
-- 
Edward O'Callaghan
http://www.auroraux.org/
eocallaghan at auroraux dot org




More information about the cfe-commits mailing list