Skip to content

Commit be7d47f

Browse files
committed
use small dense set and store the canonical type
1 parent 3763951 commit be7d47f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7172,9 +7172,9 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {
71727172
// "effectively constexpr" for better compatibility.
71737173
// See https://github.com/llvm/llvm-project/issues/102293 for more info.
71747174
if (isa<CXXDestructorDecl>(M)) {
7175-
llvm::DenseSet<QualType> Visited;
7175+
llvm::SmallDenseSet<QualType> Visited;
71767176
auto Check = [&Visited](QualType T, auto &&Check) -> bool {
7177-
if (!Visited.insert(T).second)
7177+
if (!Visited.insert(T.getCanonicalType().getUnqualifiedType()).second)
71787178
return false;
71797179
const CXXRecordDecl *RD =
71807180
T->getBaseElementTypeUnsafe()->getAsCXXRecordDecl();

0 commit comments

Comments
 (0)