OikawaKirie added inline comments.
================ Comment at: clang/lib/Index/USRGeneration.cpp:897 + if (const MemberPointerType *MPT = T->getAs<MemberPointerType>()) { + VisitType(QualType(MPT->getClass(), 0)); + Out << "::*"; ---------------- akyrtzi wrote: > A bit better to do `VisitTagDecl(MPT->getClass())`, what do you think? This was my first version of the patch, which was `VisitTagDecl(MPT->getMostRecentCXXRecordDecl())`. However, it cannot handle the `TemplateTypeParmType` type, which is presented in the last two CHECKs of the test case. Call to method `MemberPointerType::getMostRecentCXXRecordDecl` will dereference a nullptr in the function (`getClass()->getAsCXXRecordDecl()` returns nullptr) . To fully handle all circumstances, I finally choose to use the `VisitType` method. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102614/new/ https://reviews.llvm.org/D102614 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits