From 63a00eeeed4c16876d989e17360b711afce08554 Mon Sep 17 00:00:00 2001 From: zebullax Date: Wed, 15 Oct 2025 09:05:49 +0900 Subject: [PATCH] Revert "Merge pull request #191 from bloomberg/dealiasRetTypeOfArg" This reverts commit 21cba0573602a0a7c865fcdea1d2e13613ebc0fa, reversing changes made to c30343bfe5e16a25e8613a0f98b5b9973b0f6202. Signed-off-by: zebullax --- clang/lib/AST/ExprConstantMeta.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clang/lib/AST/ExprConstantMeta.cpp b/clang/lib/AST/ExprConstantMeta.cpp index c846c04056aa..0808f3124833 100644 --- a/clang/lib/AST/ExprConstantMeta.cpp +++ b/clang/lib/AST/ExprConstantMeta.cpp @@ -22,7 +22,6 @@ #include "clang/AST/Metafunction.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/Reflection.h" -#include "clang/AST/Type.h" #include "clang/Basic/DiagnosticMetafn.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" @@ -5606,9 +5605,7 @@ bool return_type_of(APValue &Result, ASTContext &C, MetaActions &Meta, switch (RV.getReflectionKind()) { case ReflectionKind::Type: { - // Unwrap alias, Keep CV and Ref - QualType rawType = desugarType(RV.getReflectedType(), true, false, false); - if (auto *FPT = dyn_cast(rawType)) { + if (auto *FPT = dyn_cast(RV.getReflectedType())) { QualType QT = desugarType(FPT->getReturnType(), /*UnwrapAliases=*/ true, /*DropCV=*/false, /*DropRefs=*/false);