Revert "Merge pull request #191 from bloomberg/dealiasRetTypeOfArg"

This reverts commit 21cba05736, reversing
changes made to c30343bfe5.

Signed-off-by: zebullax <zebullax@gmail.com>
This commit is contained in:
zebullax
2025-10-15 09:05:49 +09:00
parent 21cba05736
commit 63a00eeeed

View File

@@ -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<FunctionProtoType>(rawType)) {
if (auto *FPT = dyn_cast<FunctionProtoType>(RV.getReflectedType())) {
QualType QT =
desugarType(FPT->getReturnType(), /*UnwrapAliases=*/ true,
/*DropCV=*/false, /*DropRefs=*/false);