[clang] [clang][Parser] Improve error recovery for missing semicolons in class members. (PR #190744)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 02:58:47 PDT 2026
================
@@ -194,6 +194,17 @@ bool Parser::ExpectAndConsumeSemi(unsigned DiagID, StringRef TokenUsed) {
return ExpectAndConsume(tok::semi, DiagID , TokenUsed);
}
+bool Parser::TryInjectSemicolon() {
+ if (Tok.isAtStartOfLine() &&
+ (isDeclarationSpecifier(ImplicitTypenameContext::No))) {
----------------
cor3ntin wrote:
Why not just do that check in place of the `SkipUntil(tok::semi)` ?
https://github.com/llvm/llvm-project/pull/190744
More information about the cfe-commits
mailing list