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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user