[clang] [clang] fix infinite recursion (PR #143244)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 10 09:47:57 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::SmallDenseSet<QualType> Visited;
+ auto Check = [&Visited](QualType T, auto &&Check) -> bool {
+ if (!Visited.insert(T.getCanonicalType().getUnqualifiedType()).second)
----------------
Sirraide wrote:
```suggestion
if (!Visited.insert(T.getCanonicalTypeUnqualified()).second)
```
https://github.com/llvm/llvm-project/pull/143244
More information about the cfe-commits
mailing list