diff options
author | John McCall <rjmccall@apple.com> | 2010-12-10 11:01:00 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-10 11:01:00 +0000 |
commit | 717d9b0e2f2a8b39d3ede0b54949e8e5c200ac12 (patch) | |
tree | 46119dd1480aa529628d5ce3e03d7148cb4cd8c1 /clang/lib/Sema/SemaTemplateDeduction.cpp | |
parent | a7c04718805a1a0dc4bd95c2f1640d48ec463e7f (diff) | |
download | bcm5719-llvm-717d9b0e2f2a8b39d3ede0b54949e8e5c200ac12.tar.gz bcm5719-llvm-717d9b0e2f2a8b39d3ede0b54949e8e5c200ac12.zip |
It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
llvm-svn: 121478
Diffstat (limited to 'clang/lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index c14acd62fe7..da04b621985 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -464,7 +464,9 @@ DeduceTemplateArguments(Sema &S, assert(TemplateTypeParm->getDepth() == 0 && "Can't deduce with depth > 0"); assert(Arg != S.Context.OverloadTy && "Unresolved overloaded function"); QualType DeducedType = Arg; - DeducedType.removeCVRQualifiers(Param.getCVRQualifiers()); + + // local manipulation is okay because it's canonical + DeducedType.removeLocalCVRQualifiers(Param.getCVRQualifiers()); if (RecanonicalizeArg) DeducedType = S.Context.getCanonicalType(DeducedType); |