[clang] [clang] member pointer class qualification fix (PR #142081)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Thu May 29 21:00:35 PDT 2025
================
@@ -2127,7 +2127,7 @@ static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch(
TA = S.Context.getTypeDeclType(MPA->getMostRecentCXXRecordDecl());
} else {
NestedNameSpecifier *QA = MPA->getQualifier();
- TA = QualType(QA->translateToType(S.Context), 0);
+ TA = QualType(QA->translateToType(S.Context), 0).getUnqualifiedType();
----------------
mizvekov wrote:
Yes, getUnqualifiedType will remove the least amount of top-level sugar which will get the type unqualified.
Unfortunately we don't have yet in clang a good representation for qualification adjustments.
The existing nodes like AdjustedType would be too costly to use consistently for this very common kind of adjustment.
https://github.com/llvm/llvm-project/pull/142081
More information about the cfe-commits
mailing list