summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-12-05 01:41:37 +0000
committerReid Kleckner <reid@kleckner.net>2013-12-05 01:41:37 +0000
commit06bd7e64b995379559f91e796833c1b2763a7eeb (patch)
treebdf6418c5dc3a6261fe61fed404bb904ab717282 /clang
parent5fb7c3c4ed4415809ce877113d0850ad4ae61169 (diff)
downloadbcm5719-llvm-06bd7e64b995379559f91e796833c1b2763a7eeb.tar.gz
bcm5719-llvm-06bd7e64b995379559f91e796833c1b2763a7eeb.zip
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
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaType.cpp6
1 files changed, 4 insertions, 2 deletions
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<FunctionType>();
+ FunctionTypeUnwrapper Unwrapped(*this, T);
+ const FunctionType *FT = Unwrapped.get();
bool IsVariadic = (isa<FunctionProtoType>(FT) &&
cast<FunctionProtoType>(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
OpenPOWER on IntegriCloud