[Lldb-commits] [lldb] [lldb] Check for abstract methods implementation in Scripted Plugin Objects (PR #71260)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 6 10:08:41 PST 2023


================
@@ -32,27 +32,66 @@ class ScriptedPythonInterface : virtual public ScriptedInterface {
   ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter);
   ~ScriptedPythonInterface() override = default;
 
+  enum class AbstractMethodCheckerCases {
+    eNotImplemented,
+    eNotAllocated,
+    eNotCallable,
+    eValid
+  };
+
+  llvm::Expected<std::map<llvm::StringLiteral, AbstractMethodCheckerCases>>
+  CheckAbstractMethodImplementation(
+      const python::PythonDictionary &class_dict) const {
+
+    using namespace python;
+
+    std::map<llvm::StringLiteral, AbstractMethodCheckerCases> checker;
+#define SET_ERROR_AND_CONTINUE(method_name, error)                             \
+  {                                                                            \
+    checker[method_name] = error;                                              \
+    continue;                                                                  \
+  }
----------------
medismailben wrote:

No because we won't be able to `continue` in the lambda.

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


More information about the lldb-commits mailing list