[Mlir-commits] [mlir] [mlir][SPIR-V][NFC] Add pushCaps/pushExts helpers to type visitors (PR #195796)

Jakub Kuderski llvmlistbot at llvm.org
Tue May 5 06:41:59 PDT 2026


================
@@ -109,11 +115,8 @@ class TypeCapabilityVisitor {
             add(elementType);
         })
         .Case<SamplerType>([](auto) { /* no capabilities */ })
-        .Case<NamedBarrierType>([this](auto) {
-          static const Capability caps[] = {Capability::NamedBarrier};
-          ArrayRef<Capability> ref(caps, std::size(caps));
-          capabilities.push_back(ref);
-        })
+        .Case<NamedBarrierType>(
----------------
kuhar wrote:

These should use the type as the function argument type and drop the explicit template; see https://clang.llvm.org/extra/clang-tidy/checks/llvm/type-switch-case-types.html

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


More information about the Mlir-commits mailing list