[llvm] [Support] Accept -no-<name> to negate cl::opt<bool> (PR #224978)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 01:26:46 PDT 2026


MaskRay wrote:

> > In the future, we shall ban -=false and -=0 for boolean options. See [discourse.llvm.org/t/91877](https://discourse.llvm.org/t/91877)
> 
> I also don't think this should be conflated with the options RFC. I don't believe that changing the style of boolean options is at all necessary to realize that RFC, beyond some tiny implementation convenience.

@nikic Dropped the sentence from the PR description. My original thought: a ban on `-foo=false` and `-foo=0` can be implemented incrementally, when migrating the library defining `-foo` over to TableGen.

It's not a big deal to add `-foo=false` and `-foo=0` to the TableGen based parser as well - I just hoped we wouldn't have to support them permanently.

https://github.com/llvm/llvm-project/pull/224978


More information about the llvm-commits mailing list