summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorTan S. B <cpplearner@outlook.com>2019-08-17 20:57:52 +0000
committerTan S. B <cpplearner@outlook.com>2019-08-17 20:57:52 +0000
commit177cadc90dd0997cc5d0fc52a0974a4287be1b04 (patch)
tree22d41872badbfb5366a91ffd4ca2a3b63927c8da /lib/Sema/SemaDeclCXX.cpp
parentc0d45f53c11aadc19b7f4fee07a549b6a849a293 (diff)
downloadclang-177cadc90dd0997cc5d0fc52a0974a4287be1b04.tar.gz
[SemaDeclCXX] Allow inheriting constructor declaration to specify a cv-qualified type
Differential Revision: https://reviews.llvm.org/D47419 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 2442986eff..09c29851dd 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -9997,7 +9997,8 @@ static CXXBaseSpecifier *findDirectBaseWithType(CXXRecordDecl *Derived,
QualType DesiredBase,
bool &AnyDependentBases) {
// Check whether the named type is a direct base class.
- CanQualType CanonicalDesiredBase = DesiredBase->getCanonicalTypeUnqualified();
+ CanQualType CanonicalDesiredBase = DesiredBase->getCanonicalTypeUnqualified()
+ .getUnqualifiedType();
for (auto &Base : Derived->bases()) {
CanQualType BaseType = Base.getType()->getCanonicalTypeUnqualified();
if (CanonicalDesiredBase == BaseType)