diff options
author | John McCall <rjmccall@apple.com> | 2012-02-08 00:46:36 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-02-08 00:46:36 +0000 |
commit | 200fa53fd420aa8369586f569dbece04930ad6a3 (patch) | |
tree | 8cba3653f5d0a0caa25a13f020c1ec027e9c420c /lib/Sema/SemaType.cpp | |
parent | 531b1a91fbbf75dc2ab54f609e304376753e1679 (diff) |
Revise the SplitQualType interface to make it its own thing instead of
a typedef of std::pair. This slightly improves type-safety, but mostly
makes code using it clearer to read as well as making it possible to add
methods to the type.
Add such a method for efficiently single-step desugaring a split type.
Add a method to single-step desugaring a locally-unqualified type.
Implement both the SplitQualType and QualType methods in terms of that.
Also, fix a typo ("ObjCGLifetime").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 29cede9130..67ee9376e8 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -3497,9 +3497,9 @@ namespace { SplitQualType SplitOld = Old.split(); // As a special case, tail-recurse if there are no qualifiers. - if (SplitOld.second.empty()) - return wrap(C, SplitOld.first, I); - return C.getQualifiedType(wrap(C, SplitOld.first, I), SplitOld.second); + if (SplitOld.Quals.empty()) + return wrap(C, SplitOld.Ty, I); + return C.getQualifiedType(wrap(C, SplitOld.Ty, I), SplitOld.Quals); } QualType wrap(ASTContext &C, const Type *Old, unsigned I) { |