summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-01-19 10:06:00 +0000
committerJohn McCall <rjmccall@apple.com>2011-01-19 10:06:00 +0000
commit33ddac05bba47914e78276f6ce245b290aeff43c (patch)
tree4d9f4664df55846998bbef261673689315fb555f /clang/lib/Sema/SemaOverload.cpp
parente8231f41aab7fa8d96de84da27fb7485fbdeef1e (diff)
downloadbcm5719-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.cpp10
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();
OpenPOWER on IntegriCloud