Silence clang-tidy warning in AffineOps.cpp due to the inability to see
through the typeswitch. NFC.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This from clangd using:
- Clang version: clang version 10.0.0 (https://github.com/ycm-core/llvm 038587147cf2f97d1c3e677042f69560c65b5bea)
That is surprising. I would have expected this to fire in more cases.
mlir/lib/Dialect/Affine/IR/AffineOps.cpp | ||
---|---|---|
111 |
mlir/lib/Dialect/Affine/IR/AffineOps.cpp | ||
---|---|---|
112–113 | Is the template here really necessary? (I wonder if the warning would be fixed by removing it) This function should also be marked static. |
Address review comments.
mlir/lib/Dialect/Affine/IR/AffineOps.cpp | ||
---|---|---|
112–113 | The template <> isn't necessary here but is perhaps there for better readability as it indicates an explicit specialization for the function template above. The warning isn't getting fixed by removing it. Marked it static as well. |
Put back template <> instead of static since the latter doesn't help with the warning.