we will get warning:`parameter ‘op’ set but not used``` when template function with empty template parameter list.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks, noticed it in https://buildkite.com/mlir/mlir-core/builds/21333#98a12feb-d29c-4247-8931-3721b4291fad too.
Comment Actions
Thanks for the review.
If we use c++20, we can write verify function like this:
if constexpr (!std::tuple_size<TraitTupleT>()) const {
return success();
} else {
verifyTraits(op);
}
Unfortunately we now need to use SFINAE or Template Specialization. Maybe we can also pass Operation& with side effect instead of Operation* .
I'm not sure this change is necessary.