[all-commits] [llvm/llvm-project] 94b7d2: [Clang] Fix error recovery for default arguments (...
gtrong via All-commits
all-commits at lists.llvm.org
Tue Jul 14 00:48:49 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94b7d2b4d8d7c8cfa2d09a6aa2bb1d7df81d047c
https://github.com/llvm/llvm-project/commit/94b7d2b4d8d7c8cfa2d09a6aa2bb1d7df81d047c
Author: gtrong <40399865+gtrong at users.noreply.github.com>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/lib/Parse/ParseDecl.cpp
M clang/test/Parser/cxx-default-args.cpp
Log Message:
-----------
[Clang] Fix error recovery for default arguments (#208868)
Fixes #205718
### Description
This PR fixes an issue where Clang incorrectly skips the creation of a
parameter when an error occurs in a default argument that involves a GNU
statement expression (`({ ... })`).
Previously, if the default expression evaluation failed within a
statement expression, the error recovery was not handled properly,
leading to the parameter being dropped. This fix ensures that the
parameter is correctly created and error recovery proceeds as expected.
### Testing
Added/Updated test cases in
`clang/test/SemaCXX/default-arg-error-recovery.cpp` to cover invalid
default arguments inside statement expressions.
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