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

Viktoriia Bakalova via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 14 05:49:19 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;
----------------
VitaNuo wrote:

> For a slightly higher efficiency and for consistency with the code above?
Excatly. But I'm not sure if this matters much.

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


More information about the cfe-commits mailing list