Since we support C++17 now, we could use initializers in if statement to
simplify scope.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm not convinced that this is an improvement, and I've personally already seen quite a few colleagues accidentally write these incorrectly for nullable things. I'd rather keep these as-is.
mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp | ||
---|---|---|
631 | Agreed with River, the previous form I find clearer in cases like this. |
Comment Actions
Seems like something that should be raised to the community and codify in the style guide instead of solved on a per-review basis.
Comment Actions
https://discourse.llvm.org/t/code-style-of-initializer-in-if-statement/65357 OK, I created a topic in the community.
Agreed with River, the previous form I find clearer in cases like this.