[PATCH] D47419: [SemaDeclCXX] Allow inheriting constructor declaration that specify a cv-qualified type

S. B. Tam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 17 13:57:36 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL369196: [SemaDeclCXX] Allow inheriting constructor declaration to specify a cv… (authored by cpplearner, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D47419?vs=148744&id=215753#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D47419

Files:
  cfe/trunk/lib/Sema/SemaDeclCXX.cpp
  cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp


Index: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp
@@ -9997,7 +9997,8 @@
                                                 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)
Index: cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp
===================================================================
--- cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp
+++ cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp
@@ -62,3 +62,4 @@
   G(int &) : G(0) {}
 };
 G<B1> g(123);
+G<const B1> g2(123);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47419.215753.patch
Type: text/x-patch
Size: 1095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190817/33a33c14/attachment.bin>


More information about the cfe-commits mailing list