[PATCH] D136451: GH58368: Correct concept checking in a lambda defined in concept

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 10:30:04 PDT 2022


aaron.ballman added a comment.

Generally, this looks reasonable to me. I did spot a few things, but nothing major. Should this change come with a release note for the fix?



================
Comment at: clang/include/clang/AST/DeclTemplate.h:3310
+// during constraint checking.
+class ConceptSpecializationDecl final
+    : public Decl,
----------------
Would it make sense to rename this to `ImplicitConceptSpecializationDecl` to make it clear that this is an implicit "declaration" that the user can't spell themselves?


================
Comment at: clang/include/clang/AST/ExprConcepts.h:47
 protected:
-  /// \brief The number of template arguments in the tail-allocated list of
-  /// converted template arguments.
-  unsigned NumTemplateArgs;
+  /// \brief The 
+  ConceptSpecializationDecl *SpecDecl;
----------------
Heh, looks like this comment got munged.


================
Comment at: clang/lib/Sema/SemaTemplate.cpp:4869
 
+  ConceptSpecializationDecl *CSD =
+      ConceptSpecializationDecl::Create(Context, NamedConcept->getDeclContext(),
----------------



================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2241
+  // The size of the template list was read during creation of the Decl, so we
+  // don't have to re-read it here.e
+  VisitDecl(D);
----------------



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

https://reviews.llvm.org/D136451



More information about the cfe-commits mailing list