diff --git a/clang/test/Index/print-cxx-manglings.cpp b/clang/test/Index/print-cxx-manglings.cpp index 05b86473a24d..aae299301727 100644 --- a/clang/test/Index/print-cxx-manglings.cpp +++ b/clang/test/Index/print-cxx-manglings.cpp @@ -16,10 +16,10 @@ struct s { }; // ITANIUM: CXXConstructor=s{{.*}}[mangled=_ZN1sC2Ei] [mangled=_ZN1sC1Ei] -// ITANIUM: CXXDestructor=~s{{.*}}[mangled=_ZN1sD2Ev] [mangled=_ZN1sD1Ev] [mangled=_ZN1sD0Ev] +// ITANIUM: CXXDestructor=~s{{.*}}[mangled=_ZN1sD2Ev] [mangled=_ZN1sD1Ev] // MACHO: CXXConstructor=s{{.*}}[mangled=__ZN1sC2Ei] [mangled=__ZN1sC1Ei] -// MACHO: CXXDestructor=~s{{.*}}[mangled=__ZN1sD2Ev] [mangled=__ZN1sD1Ev] [mangled=__ZN1sD0Ev] +// MACHO: CXXDestructor=~s{{.*}}[mangled=__ZN1sD2Ev] [mangled=__ZN1sD1Ev] // MSVC: CXXConstructor=s{{.*}}[mangled=??0s@@QAE@H@Z] // MSVC: CXXDestructor=~s{{.*}}[mangled=??1s@@QAE@XZ] @@ -31,10 +31,10 @@ struct t { }; // ITANIUM: CXXConstructor=t{{.*}}[mangled=_ZN1tC2Ei] [mangled=_ZN1tC1Ei] -// ITANIUM: CXXDestructor=~t{{.*}}[mangled=_ZN1tD2Ev] [mangled=_ZN1tD1Ev] +// ITANIUM: CXXDestructor=~t{{.*}}[mangled=_ZN1tD2Ev] [mangled=_ZN1tD1Ev] [mangled=_ZN1tD0Ev] // MACHO: CXXConstructor=t{{.*}}[mangled=__ZN1tC2Ei] [mangled=__ZN1tC1Ei] -// MACHO: CXXDestructor=~t{{.*}}[mangled=__ZN1tD2Ev] [mangled=__ZN1tD1Ev] +// MACHO: CXXDestructor=~t{{.*}}[mangled=__ZN1tD2Ev] [mangled=__ZN1tD1Ev] [mangled=__ZN1tD0Ev] // MSVC: CXXConstructor=t{{.*}}[mangled=??0t@@QAE@H@Z] // MSVC: CXXDestructor=~t{{.*}}[mangled=??1t@@UAE@XZ] @@ -46,10 +46,10 @@ struct u { }; // ITANIUM: CXXConstructor=u{{.*}}[mangled=_ZN1uC2Ev] -// ITANIUM: CXXDestructor=~u{{.*}}[mangled=_ZN1uD2Ev] [mangled=_ZN1uD1Ev] +// ITANIUM: CXXDestructor=~u{{.*}}[mangled=_ZN1uD2Ev] [mangled=_ZN1uD1Ev] [mangled=_ZN1uD0Ev] // MACHO: CXXConstructor=u{{.*}}[mangled=__ZN1uC2Ev] -// MACHO: CXXDestructor=~u{{.*}}[mangled=__ZN1uD2Ev] [mangled=__ZN1uD1Ev] +// MACHO: CXXDestructor=~u{{.*}}[mangled=__ZN1uD2Ev] [mangled=__ZN1uD1Ev] [mangled=__ZN1uD0Ev] // MSVC: CXXConstructor=u{{.*}}[mangled=??0u@@QAE@XZ] // MSVC: CXXDestructor=~u{{.*}}[mangled=??1u@@UAE@XZ] diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 7f1500bc9804..c1143715d659 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -4025,8 +4025,7 @@ CXStringSet *clang_Cursor_getCXXManglings(CXCursor C) { Manglings.emplace_back(getMangledStructor(M, DL, DD, Dtor_Base)); if (Ctx.getTargetInfo().getCXXABI().isItaniumFamily()) { Manglings.emplace_back(getMangledStructor(M, DL, DD, Dtor_Complete)); - - if (!DD->isVirtual()) + if (DD->isVirtual()) Manglings.emplace_back(getMangledStructor(M, DL, DD, Dtor_Deleting)); } }