[clang] [WIP] [Modules] Delay reading type source info of the preferred_name attribute. (PR #122250)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 10 04:56:57 PST 2025


================
@@ -1156,6 +1158,19 @@ class ASTReader
   SmallVector<std::pair<VarDecl *, serialization::TypeID>, 16>
       PendingDeducedVarTypes;
 
+  struct PendingPreferredNameAttribute {
+    Decl *D;
+    AttributeCommonInfo Info;
+    serialization::TypeID TypeID;
+    bool isInherited;
+    bool isImplicit;
+    bool isPackExpansion;
+    SourceLocation ElaboratedTypedefSL;
+    NestedNameSpecifierLoc NestedNameSL;
+    SourceLocation TypedefSL;
+  };
+  std::deque<PendingPreferredNameAttribute> PendingPreferredNameAttributes;
----------------
ilya-biryukov wrote:

Why not `SmallVector` like the above?
For a slightly higher efficiency and for consistency with the code above?

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


More information about the cfe-commits mailing list