aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-25 15:31:05 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-25 15:31:05 +0000
commitaf7bea5fb496921c386459dc695485490bb06963 (patch)
tree34ebd901265cb6cfcdafa6faef02f8405e0b681c /lib
parentb453c530647acda78e6dc56d086e99566e59e5b1 (diff)
Make sure to strip off top-level cv-qualifiers as part of a
derived-to-base conversion on a pointer. Fixes PR7224. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaOverload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 6c64905561..2754d443b2 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -1233,7 +1233,7 @@ BuildSimilarlyQualifiedPointerType(const PointerType *FromPtr,
if (CanonToPointee.getLocalQualifiers() == Quals) {
// ToType is exactly what we need. Return it.
if (!ToType.isNull())
- return ToType;
+ return ToType.getUnqualifiedType();
// Build a pointer to ToPointee. It has the right qualifiers
// already.