diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-02 13:18:22 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-02 13:18:22 +0000 |
commit | cef536ec0fbc0a194f261a25cb499aeada32f943 (patch) | |
tree | 61ee1b7fb2cbd7d57be974b00e4c44ca16b049ab | |
parent | cf01800b1f5cae211f1a7685f5d21ba26c74b52b (diff) | |
download | bcm5719-llvm-cef536ec0fbc0a194f261a25cb499aeada32f943.tar.gz bcm5719-llvm-cef536ec0fbc0a194f261a25cb499aeada32f943.zip |
[C++11] Work around an incompatibility between llvm::tie and std::tie.
llvm-svn: 202643
-rw-r--r-- | clang/include/clang/AST/Type.h | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index a53937781a1..7205a5de7a9 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/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 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) { diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 97101f464ba..eedfdc4b21c 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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<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; |