[Lldb-commits] [clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

Corentin Jabot via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 29 00:55:24 PDT 2025


================
@@ -9034,11 +9225,11 @@ void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl,
   Context.setPrimaryMergedDecl(NewDecl, OldConcept->getCanonicalDecl());
 }
 
-bool Sema::CheckConceptUseInDefinition(ConceptDecl *Concept,
-                                       SourceLocation Loc) {
-  if (!Concept->isInvalidDecl() && !Concept->hasDefinition()) {
-    Diag(Loc, diag::err_recursive_concept) << Concept;
-    Diag(Concept->getLocation(), diag::note_declared_at);
+bool Sema::CheckConceptUseInDefinition(NamedDecl *Concept, SourceLocation Loc) {
+  if (auto *CE = llvm::dyn_cast<ConceptDecl>(Concept);
+      CE && !CE->isInvalidDecl() && !CE->hasDefinition()) {
+    Diag(Loc, diag::err_recursive_concept) << CE;
+    Diag(CE->getLocation(), diag::note_declared_at);
----------------
cor3ntin wrote:

Nope, concept template parameters don't have a definition. I am adding a comment.

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


More information about the lldb-commits mailing list