[llvm] [MC][DecoderEmitter] Fix build warning: explicit specialization cannot have a storage class (PR #156375)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 16:00:45 PDT 2025


jurahul wrote:

Right, the `static` seems illegal per the C++ standard to have a storage class for template specialization. And the other rule is that template specializations need to belong to the same namespace as the template being specialized. These 2 rules seem to interact here to result in a linker error if we attempt to remove the `static`. My solution to just move them to anonymous namespace (both the template and its specializations).

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


More information about the llvm-commits mailing list