cpplearner added inline comments.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:9690
+ CanQualType CanonicalDesiredBase = DesiredBase->getCanonicalTypeUnqualified()
+ .getUnqualifiedType();
for (auto &Base : Derived->bases()) {
----------------
rsmith wrote:
> How are we getting a qualified type here? Is this actually a bug in
> `getCanonicalTypeUnqualified`?
It seems that `getCanonicalTypeUnqualified` does not strip qualifiers from the
canonical type. I guess "Unqualified" here just means the method does not
include local qualifiers, unlike QualType::getCanonicalType.
Thus, in the case of `using cbase = const base;`, `getCanonicalTypeUnqualified`
will return the canonical type of `cbase` as is, which is `const base`, a
const-qualified type.
Repository:
rC Clang
https://reviews.llvm.org/D47419
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits