[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 9 10:21:20 PST 2024


================
@@ -1713,6 +1716,11 @@ class ASTContext : public RefCountedBase<ASTContext> {
   /// C++11 decltype.
   QualType getDecltypeType(Expr *e, QualType UnderlyingType) const;
 
+  QualType getPackIndexingType(QualType Pattern, Expr *IndexExpr,
+                               bool FullyExpanded = false,
+                               ArrayRef<QualType> Expansions = {},
+                               int Index = -1) const;
----------------
erichkeane wrote:

The 'index' being here seems a little suspicious... I would expect us to be just getting this from the expression.  We MIGHT be able to cache it along the way, but it'll be fragile to consistently update along the way.

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


More information about the cfe-commits mailing list