[clang] [clang] fix infinite recursion (PR #143244)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 9 04:39:48 PDT 2025
================
@@ -7172,7 +7172,10 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {
// "effectively constexpr" for better compatibility.
// See https://github.com/llvm/llvm-project/issues/102293 for more info.
if (isa<CXXDestructorDecl>(M)) {
- auto Check = [](QualType T, auto &&Check) -> bool {
+ llvm::DenseSet<QualType> Visited;
+ auto Check = [&Visited](QualType T, auto &&Check) -> bool {
+ if (!Visited.insert(T).second)
----------------
Sirraide wrote:
Oh, we should probably insert the canonical type of `T` into the set though.
https://github.com/llvm/llvm-project/pull/143244
More information about the cfe-commits
mailing list