This is an archive of the discontinued LLVM Phabricator instance.

[Diagnostics] Don't drop a statically set NoWarningAsError flag during option processing
ClosedPublic

Authored by wolfgangp on Sep 17 2021, 10:14 AM.

Details

Summary

Fixes PR 51837.

When a -W<diag> option is given on the command line, and the corresponding diangostic has the NoWarnOnError flag set, the flag is dropped when the severity is reevaluated, possibly as a result of a pragma or of command line processing.

Diff Detail

Event Timeline

wolfgangp requested review of this revision.Sep 17 2021, 10:14 AM
wolfgangp created this revision.
dexonsmith accepted this revision.Dec 14 2021, 11:52 AM

LGTM.

clang/test/Lexer/pragma-message.c
14

Might be nice to delete a blank line above to avoid triggering all these line number changes. (That said, I don't really understand why they're listed at all, given that -verify handles line numbers... maybe we want to be sure the macros work in this context?)

This revision is now accepted and ready to land.Dec 14 2021, 11:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2022, 4:39 PM