[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 12:14:03 PDT 2024


================
@@ -54,6 +54,13 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) {
   }
 }
 
+void RecordContext::stealRecordChain(RecordContext &Other) {
+  First = Other.First;
+  Last = Other.Last;
+  Other.First = nullptr;
+  Other.Last = nullptr;
+}
----------------
QuietMisdreavus wrote:

Based on how this is used it seems like it's fine, but we might want to make a note about how this overwrites this context's record chain, or otherwise rewrite this to append the other context's record chain onto this one if it's already been loaded.

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


More information about the cfe-commits mailing list