diff --git a/lldb/bindings/lua/lua-wrapper.swig b/lldb/bindings/lua/lua-wrapper.swig --- a/lldb/bindings/lua/lua-wrapper.swig +++ b/lldb/bindings/lua/lua-wrapper.swig @@ -21,6 +21,17 @@ %wrapper %{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" + +// Disable warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has +// C-linkage specified, but returns UDT 'llvm::Expected' which is +// incompatible with C +#if _MSC_VER +#pragma warning (push) +#pragma warning (disable : 4190) +#endif + // This function is called from Lua::CallBreakpointCallback SWIGEXPORT llvm::Expected LLDBSwigLuaBreakpointCallbackFunction @@ -101,6 +112,12 @@ return stop; } +#if _MSC_VER +#pragma warning (pop) +#endif + +#pragma clang diagnostic pop + SWIGEXPORT void LLDBSwigLuaCallLuaLogOutputCallback(const char *str, void *baton) { lua_State *L = (lua_State *)baton;