[all-commits] [llvm/llvm-project] eb8324: [clang][Parser] Improve error recovery for missing...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Thu Apr 16 00:27:18 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eb8324a472ff720c90fe4d90214c330d4daa1750
https://github.com/llvm/llvm-project/commit/eb8324a472ff720c90fe4d90214c330d4daa1750
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2026-04-16 (Thu, 16 Apr 2026)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Parse/Parser.h
M clang/lib/Parse/ParseCXXInlineMethods.cpp
M clang/lib/Parse/ParseDeclCXX.cpp
M clang/lib/Parse/Parser.cpp
A clang/test/AST/ast-dump-decl-recovery.cpp
M clang/test/Parser/recovery.cpp
Log Message:
-----------
[clang][Parser] Improve error recovery for missing semicolons in class members. (#190744)
This is something I discovered when doing the investigation for
https://github.com/llvm/llvm-project/pull/188123#issuecomment-4162665482.
This patch improves recovery when a semicolon is missing after a class
member declarations.
When the parser expects a semicolon but encounters a token that is at
the start of a line and is a valid declaration specifier, it injects a
`;` instead of skipping tokens, this allows us to preserve the
declaration after the missing ";" instead of discarding it.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list