[cfe-commits] r161972 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Sema/tentative-decls.c

jahanian fjahanian at apple.com
Fri Aug 17 14:51:29 PDT 2012


In r162138. 
Nick suggested making this a deprecated warning as we have standardized on using the "hidden"
attribute. Message should be more clear now.
I did not provide a "fixit" for this. This is because it would involve replacing the storage class specifier with
the attribute and AFAIK, we don't keep track of location of storage specifiers.

- fariborz

On Aug 15, 2012, at 2:22 PM, Ted Kremenek wrote:

> Sounds good.  I think the general consensus is that we need the warning to be clearer on the issue in order for it to be useful.  Thanks for working on this!
> 
> On Aug 15, 2012, at 2:19 PM, jahanian <fjahanian at apple.com> wrote:
> 
>> I am holding back until I hear from Nick. His observation of "unexpected behavior" is different than mine. I need to compare notes with him first.
>> 
>> - Fariborz
>> 
>> On Aug 15, 2012, at 2:12 PM, Ted Kremenek wrote:
>> 
>>> On Aug 15, 2012, at 1:39 PM, Richard Smith <richard at metafoo.co.uk> wrote:
>>> 
>>>> The diagnostic message should be sufficient for a typical user to have some idea of what is wrong. The current diagnostic does not meet this standard. If you explain in a bit more detail what the problem is, maybe someone will be able to come up with better diagnostic wording. In any case, diagnostic messages should not start with a capital letter.
>>> 
>>> Agreed.  Looking at the warning:
>>> 
>>>> arning: Use of __private_extern__ on tentative definition has unexpected behaviour - use
>>>>       __attribute__((visibility("hidden"))) on extern declaration or definition instead [-Wprivate-extern]
>>>> __private_extern__ int xyz;
>>> 
>>> The "unexpected behaviour" (behavior is misspelled) is content free.  That's the part that needs to be elaborated.
>>> 
>>> The "use  __attribute__((visibility("hidden"))) on extern declaration or definition instead " can be a note on the warning, which allows you to break the warning up.  A FixIt would also be nice.
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120817/ca8ff004/attachment.html>


More information about the cfe-commits mailing list