[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 07:29:50 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/include/clang/AST/DeclBase.h:1687
+    /// Only used by CXXDeductionGuideDecl. Indicates the kind
+    /// of the Deduction Guide that is the implicitly generated
+    /// (used during overload resolution).
----------------



================
Comment at: clang/include/clang/AST/DeclCXX.h:1953-1959
   bool isCopyDeductionCandidate() const {
-    return FunctionDeclBits.IsCopyDeductionCandidate;
+    return getDeductionCandidateKind() == DeductionCandidateKind::Copy;
+  }
+
+  bool isAggregateDeductionCandidate() const {
+    return getDeductionCandidateKind() == DeductionCandidateKind::Aggregate;
   }
----------------
cor3ntin wrote:
> ychen wrote:
> > cor3ntin wrote:
> > > I'm not sure how useful these things are, isAggregateDeductionCandidate is only used once
> > I meant to make it consistent with `isCopyDeductionCandidate` which is also used once. Maybe remove both `isCopyDeductionCandidate` and `isAggregateDeductionCandidate`?
> Yes, i think we might as well
I still think we should remove that


================
Comment at: clang/include/clang/Sema/Sema.h:9660
+
+    struct BuildingDeductionGuides {};
+    /// \brief Note that we are building deduction guides.
----------------
Maybe rename that `BuildingDeductionGuidesTag`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139837/new/

https://reviews.llvm.org/D139837



More information about the cfe-commits mailing list