Skip to content

Commit fb01c01

Browse files
[LLDB][Python] warning fix for LLDBSwigPythonBreakpointCallbackFunction
This is a quick followup to this commit: https://reviews.llvm.org/rGa69bbe02a2352271e8b14542073f177e24c499c1 In that, I #pragma-squelch this warning in `ScriptInterpreterPython.cpp` but we get the same warning in `PythonTestSuite.cpp`. This patch squelches the same warning in the same way as the reviweed commit. I'm submitting it without review under the "obviously correct" rule. At least if this is incorrect the main commit was also incorrect. By the way, as far as I can tell, these functions are extern "C" because SWIG does that to everything, not because they particularly need to be.
1 parent 3071ebf commit fb01c01

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ extern "C" void init_lldb(void) {}
5959
#define LLDBSwigPyInit init_lldb
6060
#endif
6161

62+
#pragma clang diagnostic push
63+
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
64+
6265
extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
6366
const char *python_function_name, const char *session_dictionary_name,
6467
const lldb::StackFrameSP &sb_frame,
@@ -67,6 +70,8 @@ extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
6770
return false;
6871
}
6972

73+
#pragma clang diagnostic pop
74+
7075
extern "C" bool LLDBSwigPythonWatchpointCallbackFunction(
7176
const char *python_function_name, const char *session_dictionary_name,
7277
const lldb::StackFrameSP &sb_frame, const lldb::WatchpointSP &sb_wp) {

0 commit comments

Comments
 (0)