Index: libcxxabi/src/demangle/ItaniumDemangle.h =================================================================== --- libcxxabi/src/demangle/ItaniumDemangle.h +++ libcxxabi/src/demangle/ItaniumDemangle.h @@ -2821,7 +2821,8 @@ if (consumeIf('C')) { bool IsInherited = consumeIf('I'); - if (look() != '1' && look() != '2' && look() != '3' && look() != '5') + if (look() != '1' && look() != '2' && look() != '3' && look() != '4' && + look() != '5') return nullptr; int Variant = look() - '0'; ++First; @@ -2830,15 +2831,15 @@ if (getDerived().parseName(State) == nullptr) return nullptr; } - return make(SoFar, false, Variant); + return make(SoFar, /*IsDtor=*/false, Variant); } - if (look() == 'D' && - (look(1) == '0' || look(1) == '1' || look(1) == '2' || look(1) == '5')) { + if (look() == 'D' && (look(1) == '0' || look(1) == '1' || look(1) == '2' || + look(1) == '4' || look(1) == '5')) { int Variant = look(1) - '0'; First += 2; if (State) State->CtorDtorConversion = true; - return make(SoFar, true, Variant); + return make(SoFar, /*IsDtor=*/true, Variant); } return nullptr; Index: libcxxabi/test/test_demangle.pass.cpp =================================================================== --- libcxxabi/test/test_demangle.pass.cpp +++ libcxxabi/test/test_demangle.pass.cpp @@ -765,10 +765,16 @@ {"_ZNK5clang14ASTMergeAction13hasPCHSupportEv", "clang::ASTMergeAction::hasPCHSupport() const"}, {"_ZNK5clang14ASTMergeAction17hasASTFileSupportEv", "clang::ASTMergeAction::hasASTFileSupport() const"}, {"_ZNK5clang14ASTMergeAction24hasCodeCompletionSupportEv", "clang::ASTMergeAction::hasCodeCompletionSupport() const"}, + {"_ZN5clang7ASTUnitC0Eb", "clang::ASTUnit::ASTUnit(bool)"}, {"_ZN5clang7ASTUnitC1Eb", "clang::ASTUnit::ASTUnit(bool)"}, {"_ZN5clang7ASTUnitC2Eb", "clang::ASTUnit::ASTUnit(bool)"}, + {"_ZN5clang7ASTUnitC4Eb", "clang::ASTUnit::ASTUnit(bool)"}, + {"_ZN5clang7ASTUnitC5Eb", "clang::ASTUnit::ASTUnit(bool)"}, + {"_ZN5clang7ASTUnitD0Ev", "clang::ASTUnit::~ASTUnit()"}, {"_ZN5clang7ASTUnitD1Ev", "clang::ASTUnit::~ASTUnit()"}, {"_ZN5clang7ASTUnitD2Ev", "clang::ASTUnit::~ASTUnit()"}, + {"_ZN5clang7ASTUnitD4Ev", "clang::ASTUnit::~ASTUnit()"}, + {"_ZN5clang7ASTUnitD5Ev", "clang::ASTUnit::~ASTUnit()"}, {"_ZN5clang7ASTUnit19CleanTemporaryFilesEv", "clang::ASTUnit::CleanTemporaryFiles()"}, {"_ZN5clang7ASTUnit28ClearCachedCompletionResultsEv", "clang::ASTUnit::ClearCachedCompletionResults()"}, {"_ZN5clang7ASTUnit26CacheCodeCompletionResultsEv", "clang::ASTUnit::CacheCodeCompletionResults()"}, Index: llvm/include/llvm/Demangle/ItaniumDemangle.h =================================================================== --- llvm/include/llvm/Demangle/ItaniumDemangle.h +++ llvm/include/llvm/Demangle/ItaniumDemangle.h @@ -2821,7 +2821,8 @@ if (consumeIf('C')) { bool IsInherited = consumeIf('I'); - if (look() != '1' && look() != '2' && look() != '3' && look() != '5') + if (look() != '1' && look() != '2' && look() != '3' && look() != '4' && + look() != '5') return nullptr; int Variant = look() - '0'; ++First; @@ -2830,15 +2831,15 @@ if (getDerived().parseName(State) == nullptr) return nullptr; } - return make(SoFar, false, Variant); + return make(SoFar, /*IsDtor=*/false, Variant); } - if (look() == 'D' && - (look(1) == '0' || look(1) == '1' || look(1) == '2' || look(1) == '5')) { + if (look() == 'D' && (look(1) == '0' || look(1) == '1' || look(1) == '2' || + look(1) == '4' || look(1) == '5')) { int Variant = look(1) - '0'; First += 2; if (State) State->CtorDtorConversion = true; - return make(SoFar, true, Variant); + return make(SoFar, /*IsDtor=*/true, Variant); } return nullptr;