[clang] [APINotes] Support nested tags (PR #99655)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 19 07:39:42 PDT 2024


================
@@ -958,12 +961,18 @@ class YAMLConverter {
     ContextInfo CI;
     auto TagCtxID = Writer.addContext(ParentContextID, T.Name, ContextKind::Tag,
                                       CI, SwiftVersion);
+    Context TagCtx(TagCtxID, ContextKind::Tag);
 
     for (const auto &CXXMethod : T.Methods) {
       CXXMethodInfo MI;
       convertFunction(CXXMethod, MI);
       Writer.addCXXMethod(TagCtxID, CXXMethod.Name, MI, SwiftVersion);
     }
+
+    // Convert nested tags.
+    for (const auto &Tag : T.Tags) {
+      convertTagContext(TagCtx, Tag, SwiftVersion);
+    }
----------------
compnerd wrote:

Nit: Unnecessary braces

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


More information about the cfe-commits mailing list