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);


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);
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to