Merge commit 924f773f5e26 from llvm git (by Younan Zhang):

[Clang] Don't diagnose missing members when looking at the instantiating class template (#180725)

  The perfect matching patch revealed another bug where recursive
  instantiations could lead to the escape of SFINAE errors, as shown in
  the issue.

  Fixes https://github.com/llvm/llvm-project/issues/179118

This fixes compile errors in the www/qt5-webengine port.

PR:		292067
MFC after:	1 month
This commit is contained in:
Dimitry Andric
2026-02-10 20:54:38 +01:00
parent b99d02027a
commit 3fd796204f
@@ -2934,7 +2934,7 @@ ExprResult Sema::BuildQualifiedDeclarationNameExpr(
// members were likely supposed to be inherited.
DeclContext *DC = computeDeclContext(SS);
if (const auto *CD = dyn_cast<CXXRecordDecl>(DC))
if (CD->isInvalidDecl())
if (CD->isInvalidDecl() || CD->isBeingDefined())
return ExprError();
Diag(NameInfo.getLoc(), diag::err_no_member)
<< NameInfo.getName() << DC << SS.getRange();