Flang C++ Style Guide tells us to avoid .has_value() in the predicate
expressions of control flow statements. I am treating ternary
expressions as control flow statements for the purpose of this patch.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Hi @kazu, thanks for making a review and making the code style consistent. It seems part of the change is breaking builds (see bots).
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1108 | This is breaking the build bots: /var/lib/buildkite-agent/builds/llvm-project/flang/lib/Optimizer/Dialect/FIROps.cpp:1077:7: error: value of type 'mlir::OptionalParseResult' is not contextually convertible to 'bool' if (parseResult && failed(*parseResult)) ^~~~~~~~~~~ Same below in /var/lib/buildkite-agent/builds/llvm-project/flang/lib/Optimizer/Dialect/FIROps.cpp:1259:9 |
Comment Actions
Oops. Thank you for pointing out the breakage. It looks like I temporarily disabled flang, and I was testing anything. Please take a look again.
This is breaking the build bots:
Same below in /var/lib/buildkite-agent/builds/llvm-project/flang/lib/Optimizer/Dialect/FIROps.cpp:1259:9