s-watanabe314 wrote: @andykaylor I've modified the code to output the warning message proposed [here](https://github.com/llvm/llvm-project/pull/132680#issuecomment-2775345211). Please review it.
I considered an implementation that wouldn't add a new variable `LastComplexRangeOption`, but I couldn't avoid affecting existing warnings. Specifically, there's a problem with the test in [fp-model.c](https://github.com/llvm/llvm-project/blob/972ecc31f72e16ae4a9337ce6bc85059404eaf4f/clang/test/Driver/fp-model.c#L206-L208). This test expects the warning message `warning: overriding '-fcomplex-arithmetic=basic' option with '-fcomplex-arithmetic=promoted'` for `clang -ffast-math -ffp-model=fast`. I'm not sure if this test is correct, but I believe a new variable is necessary to avoid affecting it. If we stored the history of non-Gcc options in the existing `GccComplexRangeOption`, the above warning message would become `overriding '-ffast-math' option with '-ffp-model=fast'`. Should I also fix all warnings related to complex range options other than `-fno-fast-math`? https://github.com/llvm/llvm-project/pull/132680 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits