[PATCH] D130709: MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 14:20:31 PDT 2022


rnk added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:4316
+          for (auto const &Base : ClassDecl->bases()) {
+            QualType BT = cast<ElaboratedType>(Base.getType())->getNamedType();
+            const auto *BaseTemplate = dyn_cast<TemplateSpecializationType>(BT);
----------------
Is this cast always safe? Is there a simpler way to check if the base type is a template specialization type?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130709



More information about the cfe-commits mailing list