From: Benjamin Kramer Date: Sun, 2 Mar 2014 13:18:22 +0000 (+0000) Subject: [C++11] Work around an incompatibility between llvm::tie and std::tie. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9c494f379bbd133a85172cd6e4abd7a23a7e454;p=clang [C++11] Work around an incompatibility between llvm::tie and std::tie. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202643 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index a53937781a..7205a5de7a 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -506,8 +506,8 @@ struct SplitQualType { SplitQualType getSingleStepDesugaredType() const; // end of this file // Make std::tie work. - operator std::pair() const { - return std::pair(Ty, Quals); + std::pair asPair() const { + return std::pair(Ty, Quals); } friend bool operator==(SplitQualType a, SplitQualType b) { diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 97101f464b..eedfdc4b21 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -6004,8 +6004,10 @@ checkPointerTypesForAssignment(Sema &S, QualType LHSType, QualType RHSType) { // get the "pointed to" type (ignoring qualifiers at the top level) const Type *lhptee, *rhptee; Qualifiers lhq, rhq; - std::tie(lhptee, lhq) = cast(LHSType)->getPointeeType().split(); - std::tie(rhptee, rhq) = cast(RHSType)->getPointeeType().split(); + std::tie(lhptee, lhq) = + cast(LHSType)->getPointeeType().split().asPair(); + std::tie(rhptee, rhq) = + cast(RHSType)->getPointeeType().split().asPair(); Sema::AssignConvertType ConvTy = Sema::Compatible;