diff options
author | John McCall <rjmccall@apple.com> | 2011-01-19 10:06:00 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-01-19 10:06:00 +0000 |
commit | 33ddac05bba47914e78276f6ce245b290aeff43c (patch) | |
tree | 4d9f4664df55846998bbef261673689315fb555f /clang/lib/Sema/SemaOverload.cpp | |
parent | e8231f41aab7fa8d96de84da27fb7485fbdeef1e (diff) | |
download | bcm5719-llvm-33ddac05bba47914e78276f6ce245b290aeff43c.tar.gz bcm5719-llvm-33ddac05bba47914e78276f6ce245b290aeff43c.zip |
Change the canonical representation of array types to store qualifiers on the
outermost array types and not on the element type. Move the CanonicalType
member from Type to ExtQualsTypeCommonBase; the canonical type on an ExtQuals
node includes the qualifiers on the ExtQuals. Assorted optimizations enabled
by this change.
getQualifiers(), hasQualifiers(), etc. should all now implicitly look through
array types.
llvm-svn: 123817
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 06a34c22c54..a1b09d91f2d 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -4461,17 +4461,17 @@ BuiltinCandidateTypeSet::AddTypesConvertedFrom(QualType Ty, if (const ReferenceType *RefTy = Ty->getAs<ReferenceType>()) Ty = RefTy->getPointeeType(); - // We don't care about qualifiers on the type. + // If we're dealing with an array type, decay to the pointer. + if (Ty->isArrayType()) + Ty = SemaRef.Context.getArrayDecayedType(Ty); + + // Otherwise, we don't care about qualifiers on the type. Ty = Ty.getLocalUnqualifiedType(); // Flag if we ever add a non-record type. const RecordType *TyRec = Ty->getAs<RecordType>(); HasNonRecordTypes = HasNonRecordTypes || !TyRec; - // If we're dealing with an array type, decay to the pointer. - if (Ty->isArrayType()) - Ty = SemaRef.Context.getArrayDecayedType(Ty); - // Flag if we encounter an arithmetic type. HasArithmeticOrEnumeralTypes = HasArithmeticOrEnumeralTypes || Ty->isArithmeticType(); |