[clang] [clang][ExtractAPI] Add support C unions in non C++ parsing mode (PR #77451)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 10 10:19:52 PST 2024


================
@@ -1267,30 +1271,31 @@ class APISet {
                       DeclarationFragments Declaration,
                       DeclarationFragments SubHeading, bool IsFromSystemHeader);
 
-  /// Create and add a struct field record into the API set.
+  /// Create and add a record field record into the API set.
   ///
   /// Note: the caller is responsible for keeping the StringRef \p Name and
   /// \p USR alive. APISet::copyString provides a way to copy strings into
   /// APISet itself, and APISet::recordUSR(const Decl *D) is a helper method
   /// to generate the USR for \c D and keep it alive in APISet.
-  StructFieldRecord *
-  addStructField(StructRecord *Struct, StringRef Name, StringRef USR,
+  RecordFieldRecord *
+  addRecordField(RecordRecord *Record, StringRef Name, StringRef USR,
                  PresumedLoc Loc, AvailabilitySet Availability,
                  const DocComment &Comment, DeclarationFragments Declaration,
-                 DeclarationFragments SubHeading, bool IsFromSystemHeader);
+                 DeclarationFragments SubHeading, APIRecord::RecordKind Kind,
+                 bool IsFromSystemHeader);
 
   /// Create and add a struct record into the API set.
----------------
QuietMisdreavus wrote:

```suggestion
  /// Create and add a record record into the API set.
```

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


More information about the cfe-commits mailing list