diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-03-10 00:29:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-03-10 00:29:33 +0000 |
commit | db762ef262987403b4e2a3bb8d5762277306a224 (patch) | |
tree | d6d4ea708bfa97fb0623325e71d5aa3817e2687e /lib/Sema/SemaOverload.cpp | |
parent | 0069b84c2aa7cc39263e85997b7cb1ed0b132ccd (diff) |
Qualifiers on a canonical array type go on the outermost type, not the
innermost type. Fixes PR12142.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 7434f0f8d7..22b145c59a 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -7847,12 +7847,6 @@ void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I) { if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) { - // It is dumb that we have to do this here. - while (isa<ArrayType>(CFromTy)) - CFromTy = CFromTy->getAs<ArrayType>()->getElementType(); - while (isa<ArrayType>(CToTy)) - CToTy = CFromTy->getAs<ArrayType>()->getElementType(); - Qualifiers FromQs = CFromTy.getQualifiers(); Qualifiers ToQs = CToTy.getQualifiers(); |