aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 4ffca8c8f5..a73c261d97 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -1295,22 +1295,19 @@ public:
TypeWithHandler(const QualType &type, CXXCatchStmt *statement)
: t(type), stmt(statement) {}
+ // An arbitrary order is fine as long as it places identical
+ // types next to each other.
bool operator<(const TypeWithHandler &y) const {
- if (t.getTypePtr() < y.t.getTypePtr())
+ if (t.getAsOpaquePtr() < y.t.getAsOpaquePtr())
return true;
- else if (t.getTypePtr() > y.t.getTypePtr())
- return false;
- else if (t.getCVRQualifiers() < y.t.getCVRQualifiers())
- return true;
- else if (t.getCVRQualifiers() < y.t.getCVRQualifiers())
+ if (t.getAsOpaquePtr() > y.t.getAsOpaquePtr())
return false;
else
return getTypeSpecStartLoc() < y.getTypeSpecStartLoc();
}
bool operator==(const TypeWithHandler& other) const {
- return t.getTypePtr() == other.t.getTypePtr()
- && t.getCVRQualifiers() == other.t.getCVRQualifiers();
+ return t == other.t;
}
QualType getQualType() const { return t; }