[llvm] [Offload] Fix warn-unused function (PR #208642)

Vassil Vassilev via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 02:20:13 PDT 2026


================
@@ -98,7 +98,8 @@ inline Error error(error::ErrorCode Code, Error &&OtherError,
 /// the plugin-specific code.
 /// TODO: Refactor this, must be defined individually by each plugin.
 template <typename... ArgsTy>
-static Error check(int32_t ErrorCode, const char *ErrFmt, ArgsTy... Args);
+[[maybe_unused]] static Error check(int32_t ErrorCode, const char *ErrFmt,
----------------
vgvassilev wrote:

The static is an odr violation since if means internal linkage. We need to drop the static templates in header files. 

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


More information about the llvm-commits mailing list