From 06bd7e64b995379559f91e796833c1b2763a7eeb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 5 Dec 2013 01:41:37 +0000 Subject: Fix non-MSVC build error in ASTContext::getAdjustedType Use FunctionTypeUnwrapper like we do in AttributedType to try to keep some sugar. We can actually do one better here in the future by avoiding the AdjustedType node altogether when no sugar would be lost. llvm-svn: 196455 --- clang/lib/Sema/SemaType.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib') diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 63ac15baeb6..6dfc235a142 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -4596,7 +4596,8 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, } void Sema::adjustMemberFunctionCC(QualType &T, bool IsStatic) { - const FunctionType *FT = T->castAs(); + FunctionTypeUnwrapper Unwrapped(*this, T); + const FunctionType *FT = Unwrapped.get(); bool IsVariadic = (isa(FT) && cast(FT)->isVariadic()); @@ -4621,7 +4622,8 @@ void Sema::adjustMemberFunctionCC(QualType &T, bool IsStatic) { } FT = Context.adjustFunctionType(FT, FT->getExtInfo().withCallingConv(ToCC)); - T = Context.getAdjustedType(T, QualType(FT, T.getQualifiers())); + QualType Wrapped = Unwrapped.wrap(*this, FT); + T = Context.getAdjustedType(T, Wrapped); } /// Handle OpenCL image access qualifiers: read_only, write_only, read_write -- cgit v1.2.3