[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 19:17:38 PDT 2023


MaskRay added a comment.

In D158137#4597491 <https://reviews.llvm.org/D158137#4597491>, @dexonsmith wrote:

> In D158137#4597009 <https://reviews.llvm.org/D158137#4597009>, @MaskRay wrote:
>
>> In D158137#4596948 <https://reviews.llvm.org/D158137#4596948>, @dexonsmith wrote:
>>
>>> Can you explain the downside of leaving behind an alias?
>>
>> Two minor ones. (a) Existing `-Wno-overriding-t-option` will not notice that they need to migrate and (b) Clang has accrued tiny tech debt.
>> If we eventually remove `-Wno-overriding-t-option` for tidiness, we will have to break `-Werror -Wno-overriding-t-option` users.
>
> I guess it's not clear to me we'd need to remove the alias. The usual policy (I think?) is that clang driver options don't disappear. It seems like a small piece of debt to maintain the extra alias in this case, and if it's kept, then users don't actually need to migrate. And then you can feel safe updating Darwin.cpp as well.

`-W*` options are different from regular driver options in that `-Wunknown-unknown-unknown` leads to a warning instead of an error, while a regular unrecognized driver option leads to an error.
We deprecate driver options and make use of them warnings, that would break `-Werror` users as well, but we'll do that anyway if reasonable.

I understand that it is a small piece of debt, but my point is that we don't need the debt.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158137



More information about the cfe-commits mailing list