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
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D47419: [... S. B. Tam via Phabricator via cfe-commits
    • [PATCH] D474... Rustam Abdullaev via Phabricator via cfe-commits
    • [PATCH] D474... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D474... S. B. Tam via Phabricator via cfe-commits

Reply via email to