[Lldb-commits] [PATCH] D122753: Fix NSIndexPathSyntheticFrontEnd::Impl::Clear() to only clear the active union member

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 30 18:02:12 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG14cad95d3823: [LLDB] Fix NSIndexPathSyntheticFrontEnd::Impl::Clear() to only clear the active… (authored by shafik).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122753/new/

https://reviews.llvm.org/D122753

Files:
  lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp


Index: lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
===================================================================
--- lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
+++ lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
@@ -282,9 +282,17 @@
     };
 
     void Clear() {
+      switch (m_mode) {
+      case Mode::Inlined:
+        m_inlined.Clear();
+        break;
+      case Mode::Outsourced:
+        m_outsourced.Clear();
+        break;
+      case Mode::Invalid:
+        break;
+      }
       m_mode = Mode::Invalid;
-      m_inlined.Clear();
-      m_outsourced.Clear();
     }
 
     Impl() {}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122753.419301.patch
Type: text/x-patch
Size: 619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220331/a56b4815/attachment.bin>


More information about the lldb-commits mailing list