[clang] [clang] Allow `ConditionalOperator` fast-math flags to be overridden by `pragma float_control` (PR #105912)

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 7 04:25:53 PDT 2024


spavloff wrote:

I don't think think setting FPOptions in `ConditionalOperator` is a good idea. This operator does not represent any floating-point operation so setting FP properties on it does not look reasonable.

Instead, I would like to propose you using FPOptions from CompoundStmt, you could use the same code as in this PR: https://github.com/llvm/llvm-project/pull/89617/files#diff-6ddbe6b52b91cf337ee1b7c1ce6ced7d81882f749ac36c81d12714cb298319d6R568-R573
It was added just for similar cases.

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


More information about the cfe-commits mailing list