[cfe-commits] Warning flags
Ahmed Charles
ahmedcharles at gmail.com
Fri Oct 7 01:53:11 PDT 2011
Here is the first few. They have to be applied in order, or the
changes in the test will conflict. And hopefully the naming is
appealing enough. :)
On Thu, Oct 6, 2011 at 2:10 PM, Ahmed Charles <ahmedcharles at gmail.com> wrote:
> On Thu, Oct 6, 2011 at 1:16 PM, Ted Kremenek <kremenek at apple.com> wrote:
>> On Oct 6, 2011, at 10:21 AM, Ahmed Charles wrote:
>>
>> I'm looking into adding flags for the various warnings without them and was
>> wondering what the bar is in terms of test cases? It seems like existing
>> flags don't have explicit test cases and in some cases neither do the
>> warnings.
>>
>> Good questions. These are two separate issues. It's simply bad that we
>> have warnings that aren't being tested at all (behaviorally). For those we
>> should continue to add test cases to improve our coverage of the compiler's
>> behavior.
>> For testing coverage of warning flags, the only thing you could really test
>> from a behavior perspective is whether passing -W/-Wno<warning>
>> enables/disables the warning (or use pragmas that accomplish the same
>> thing). Many warnings are on by default, so many of the tests would need to
>> go for the "disable warning" route. We are pretty confident that the
>> general warning suppression/enabling mechanism works (it is well tested), so
>> we only really need to add specific tests like these for warnings where it
>> is clear we want to tease out some warning from a larger class of warnings
>> and have the ability to disable it (e.g., a user explicitly requested this
>> functionality).
>> So, for testing whether or not a warning has a flag, we have
>> test/Misc/warning-flags.c. Essentially we run diagtool to list all the
>> warnings that are not covered by a flag. Whenever a warning that was
>> previously not covered by a flag gets a flag, this test needs to be updated
>> (i.e., remove the entry). That's usually sufficient in my opinion to test
>> that a warning is covered by a flag.
>
> Thanks, that's what I thought.
>
> --
> Ahmed Charles
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Place-diagnostic-backslash_newline_space-under-the-W.patch
Type: application/octet-stream
Size: 1329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Place-diagnostics-null_in_string-null_in_char-and-nu.patch
Type: application/octet-stream
Size: 2666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Place-renamed-diagnostic-ext_charize_microsoft-under.patch
Type: application/octet-stream
Size: 2426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Place-diagnostic-ext_dollar_in_identifier-under-the-.patch
Type: application/octet-stream
Size: 1656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Place-diagnostics-ext_c99_array_usage-ext_c99_compou.patch
Type: application/octet-stream
Size: 4163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Place-diagnostic-ext_auto_storage_class-under-the-Wa.patch
Type: application/octet-stream
Size: 1470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-Place-diagnostics-ext_catch_incomplete_ref-and-ext_c.patch
Type: application/octet-stream
Size: 2582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-Place-diagnostics-ext_flexible_array_in_array-and-ex.patch
Type: application/octet-stream
Size: 2741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-Place-diagnostic-warn_delete_incomplete-under-the-Wd.patch
Type: application/octet-stream
Size: 1830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-Place-diagnostics-warn_c_kext-warn_drv_assuming_mflo.patch
Type: application/octet-stream
Size: 7227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Place-diagnostics-warn_ucn_escape_too_large-and-warn.patch
Type: application/octet-stream
Size: 2605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111007/80ec2631/attachment-0010.obj>
More information about the cfe-commits
mailing list