diff options
author | John McCall <rjmccall@apple.com> | 2009-10-23 23:03:21 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-10-23 23:03:21 +0000 |
commit | e27ec8ad56dbf1efb2de004b90fbbb86f740e3f1 (patch) | |
tree | 8de71b2a430b93e5324d7d0c753c0873938d8935 /lib/Sema/SemaTemplateDeduction.cpp | |
parent | 097bfb11759be2187732329ecf4c0849609cdf57 (diff) |
Store the builtin types as CanQualTypes. Expand a bit on the CanQual API,
but also remove some methods that cause ambiguities, and generally
make CanQual<blah> more analogous to QualType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateDeduction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index 2a44f83598..32ae0a8dd0 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/lib/Sema/SemaTemplateDeduction.cpp @@ -1643,15 +1643,15 @@ DeduceTemplateArgumentsDuringPartialOrdering(ASTContext &Context, // performed on the types used for partial ordering: // - If P is a reference type, P is replaced by the type referred to. CanQual<ReferenceType> ParamRef = Param->getAs<ReferenceType>(); - if (ParamRef) + if (!ParamRef.isNull()) Param = ParamRef->getPointeeType(); // - If A is a reference type, A is replaced by the type referred to. CanQual<ReferenceType> ArgRef = Arg->getAs<ReferenceType>(); - if (ArgRef) + if (!ArgRef.isNull()) Arg = ArgRef->getPointeeType(); - if (QualifierComparisons && ParamRef && ArgRef) { + if (QualifierComparisons && !ParamRef.isNull() && !ArgRef.isNull()) { // C++0x [temp.deduct.partial]p6: // If both P and A were reference types (before being replaced with the // type referred to above), determine which of the two types (if any) is |