r202643 - [C++11] Work around an incompatibility between llvm::tie and std::tie.
Benjamin Kramer
benny.kra at googlemail.com
Sun Mar 2 05:18:22 PST 2014
Author: d0k
Date: Sun Mar 2 07:18:22 2014
New Revision: 202643
URL: http://llvm.org/viewvc/llvm-project?rev=202643&view=rev
Log:
[C++11] Work around an incompatibility between llvm::tie and std::tie.
Modified:
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=202643&r1=202642&r2=202643&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Sun Mar 2 07:18:22 2014
@@ -506,8 +506,8 @@ struct SplitQualType {
SplitQualType getSingleStepDesugaredType() const; // end of this file
// Make std::tie work.
- operator std::pair<const Type *,Qualifiers>() const {
- return std::pair<const Type *,Qualifiers>(Ty, Quals);
+ std::pair<const Type *,Qualifiers> asPair() const {
+ return std::pair<const Type *, Qualifiers>(Ty, Quals);
}
friend bool operator==(SplitQualType a, SplitQualType b) {
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=202643&r1=202642&r2=202643&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Mar 2 07:18:22 2014
@@ -6004,8 +6004,10 @@ checkPointerTypesForAssignment(Sema &S,
// get the "pointed to" type (ignoring qualifiers at the top level)
const Type *lhptee, *rhptee;
Qualifiers lhq, rhq;
- std::tie(lhptee, lhq) = cast<PointerType>(LHSType)->getPointeeType().split();
- std::tie(rhptee, rhq) = cast<PointerType>(RHSType)->getPointeeType().split();
+ std::tie(lhptee, lhq) =
+ cast<PointerType>(LHSType)->getPointeeType().split().asPair();
+ std::tie(rhptee, rhq) =
+ cast<PointerType>(RHSType)->getPointeeType().split().asPair();
Sema::AssignConvertType ConvTy = Sema::Compatible;
More information about the cfe-commits
mailing list