summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/AST/Type.h4
-rw-r--r--clang/lib/Sema/SemaExpr.cpp6
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;
OpenPOWER on IntegriCloud