Skip to content

Commit 08e9ffa

Browse files
committed
use small dense set and store the canonical type
1 parent 62a698f commit 08e9ffa

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
@@ -7159,9 +7159,9 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {
71597159
// "effectively constexpr" for better compatibility.
71607160
// See https://github.com/llvm/llvm-project/issues/102293 for more info.
71617161
if (isa<CXXDestructorDecl>(M)) {
7162-
llvm::DenseSet<QualType> Visited;
7162+
llvm::SmallDenseSet<QualType> Visited;
71637163
auto Check = [&Visited](QualType T, auto &&Check) -> bool {
7164-
if (!Visited.insert(T).second)
7164+
if (!Visited.insert(T.getCanonicalType().getUnqualifiedType()).second)
71657165
return false;
71667166
const CXXRecordDecl *RD =
71677167
T->getBaseElementTypeUnsafe()->getAsCXXRecordDecl();

0 commit comments

Comments
 (0)