[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.
Jun Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 8 04:17:27 PST 2022
junaire added inline comments.
================
Comment at: clang/test/Sema/err-expr-stmt-in-default-arg.cpp:19
+ return bar(l);
+}
----------------
erichkeane wrote:
> For completeness, I'd like to see an in-function-defined-struct-member-function test here as well.
>
> As for the above question about the recovery, something like:
>
> `void fn(int i, int j = ({ {},{},{,} }), int k = "");` I think checks all the issues I can think of. We want to make sure that 'k' still diagnoses its error correctly (and that we have just skipped all of the expression statement stuff).
Note that clang is already rejected the code: https://godbolt.org/z/57c4qaaPo
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119609/new/
https://reviews.llvm.org/D119609
More information about the cfe-commits
mailing list