[PATCH] D121175: [clang] Add -Wstart-no-unknown-warning-option/-Wend-no-unknown-warning-option.

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 12:38:44 PDT 2022


mstorsjo added a comment.

In D121175#3486104 <https://reviews.llvm.org/D121175#3486104>, @phosek wrote:

> In D121175#3481547 <https://reviews.llvm.org/D121175#3481547>, @MaskRay wrote:
>
>> Probably no from my view, as I got another internal feedback that "this seems rather crufty".
>> It seems that it is the build system maintainer's responsibility. If you add `-Wno-unknown-warning-option` temporarily, after a new clang is rolled, you may remove `-Wno-unknown-warning-option`.
>
> You can make the same exact argument about  `--start-no-unused-arguments`/`--end-no-unused-arguments` introduced in D116503 <https://reviews.llvm.org/D116503> which hasn't received the same pushback.
>
> In D121175#3485891 <https://reviews.llvm.org/D121175#3485891>, @dblaikie wrote:
>
>> Would an explicit naming be more suitable than a region start/end? (I'd have considered this feedback for D116503 <https://reviews.llvm.org/D116503> too, but didn't catch that one in review) The region based thing makes non-positional arguments weirdly positional (not that these are the first instances of that in compiler/linker tools, I don't think) - and I guess the override behavior is already positional to some degree.
>>
>> But something like -Wno-unused-command-line-argument=-Wfoobarbaz -Wfoobarbaz - sort of like password entry, type it twice so you've got less chance of mistakes?
>
> That would be fine with me as long as this also covers warnings included as part of `-Wall` and `-Wextra` (that is you could do `-Wall -Wno-unused-command-line-argument=-Wfoobarbaz`).
>
> I'd prefer if `--start-no-unused-arguments`/`--end-no-unused-arguments` and `-Wstart-no-unknown-warning-option`/`-Wend-no-unknown-warning-option` were symmetric but I'm not sure if we can change `--start-no-unused-arguments`/`--end-no-unused-arguments` at this point since it shipped in Clang 14.

Regarding usability - at least for `--start-no-unused-arguments`, in most cases I have 5-11 arguments within that start/stop region, so keeping it as a region is a fair bit more convenient than naming them one at a time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121175/new/

https://reviews.llvm.org/D121175



More information about the cfe-commits mailing list