rjmccall accepted this revision.
rjmccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:9690
+  CanQualType CanonicalDesiredBase = DesiredBase->getCanonicalTypeUnqualified()
+    .getUnqualifiedType();
   for (auto &Base : Derived->bases()) {
----------------
cpplearner wrote:
> 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.
Maybe we should have a method that promises to return an unqualified type.

This change seems reasonable overall.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D47419/new/

https://reviews.llvm.org/D47419



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to