hvdijk wrote:
It turns out that both this and `DecltypeType` are handled already by
`getCanonicalType()`, which we call already but then drop its result. If we
continue using it, and revert your code changes but keep your tests, those
tests pass:
```diff
--- a/clang/lib/Interpreter/InterpreterValuePrinter.cpp
+++ b/clang/lib/Interpreter/InterpreterValuePrinter.cpp
@@ -78,7 +78,7 @@ static std::string QualTypeToString(ASTContext &Ctx, QualType
QT) {
!NonRefTy->isMemberPointerType())
return Canon.getAsString(Ctx.getPrintingPolicy());
- if (const auto *TDTy = dyn_cast<TypedefType>(NonRefTy)) {
+ if (const auto *TDTy = dyn_cast<TypedefType>(Canon)) {
// FIXME: TemplateSpecializationType & SubstTemplateTypeParmType checks
// are predominately to get STL containers to print nicer and might be
// better handled in GetFullyQualifiedName.
@@ -90,10 +90,10 @@ static std::string QualTypeToString(ASTContext &Ctx,
QualType QT) {
if (llvm::isa<SubstTemplateTypeParmType>(SSDesugar))
return GetFullTypeName(Ctx, Canon);
else if (llvm::isa<TemplateSpecializationType>(SSDesugar))
- return GetFullTypeName(Ctx, NonRefTy);
- return DeclTypeToString(NonRefTy, TDTy->getDecl());
+ return GetFullTypeName(Ctx, Canon);
+ return DeclTypeToString(Canon, TDTy->getDecl());
}
- return GetFullTypeName(Ctx, NonRefTy);
+ return GetFullTypeName(Ctx, Canon);
}
static std::string EnumToString(const Value &V) {
```
Would you be able to see if this also works for what you found with
`UnaryTransformType` ?
https://github.com/llvm/llvm-project/pull/186105
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits