forked from OSchip/llvm-project
[SemaDeclCXX] Allow inheriting constructor declaration to specify a cv-qualified type
Differential Revision: https://reviews.llvm.org/D47419 llvm-svn: 369196
This commit is contained in:
parent
032e1fdcd4
commit
8fd6aa5ed2
|
@ -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)
|
||||
|
|
|
@ -62,3 +62,4 @@ struct G : T {
|
|||
G(int &) : G(0) {}
|
||||
};
|
||||
G<B1> g(123);
|
||||
G<const B1> g2(123);
|
||||
|
|
Loading…
Reference in New Issue