diff options
author | John McCall <rjmccall@apple.com> | 2009-09-24 19:53:00 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-24 19:53:00 +0000 |
commit | 0953e767ff7817f97b3ab20896b229891eeff45b (patch) | |
tree | ae766419bc367458454d0ff47206caf639a6934b /lib/Sema/SemaStmt.cpp | |
parent | e7a5fd4a2969176d8b63a0a26039f895fc359ac4 (diff) |
Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 13 |
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; } |