================
@@ -6585,6 +6585,9 @@ NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D,
return nullptr;
D.setInvalidType();
+ } else if (CurContext->isRecord() && !CurContext->Equals(DC)) {
+ // Keep the diagnosed declaration for recovery, but not as a valid one.
----------------
TPPPP72 wrote:
If the final fix is confirmed to be this approach, then I don't think this
comment is necessary, as it is self-evident.
https://github.com/llvm/llvm-project/pull/217942
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits