Repository navigation
Commit 2dff3f1
REGRESSION(324783@main): [JSC] Build fails with clang 20: "unnamed variable cannot be implicitly captured in a lambda expression" in LiteralParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=329046
Reviewed by Carlos Alberto Lopez Perez.
Since 324783@main, clang 20 fails to compile LiteralParser.cpp:
error: unnamed variable cannot be implicitly captured in a lambda expression
The in-class declaration of LiteralParser::parseRecursively() leaves its
VM& parameter unnamed, while the out-of-line definition names it `vm` and
has a trailing requires-clause. When a lambda inside the definition
implicitly captures `vm` with [&], clang 20 resolves the capture to the
parameter of the unnamed declaration and rejects it.
Before 324783@main this was avoided by capturing `vm` explicitly with
`&vm = vm`, but that change replaced those captures with plain [&] and
added new lambdas that use `vm`. Capture `vm` explicitly again in the
parseValue, putWithTransition and property lambdas, which are the ones
in parseRecursively() that use it.
* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType, reviverMode>::parseRecursively):
Canonical link: https://commits.webkit.org/324843@main1 parent 45f193a commit 2dff3f1
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1643 | 1643 | | |
1644 | 1644 | | |
1645 | 1645 | | |
1646 | | - | |
| 1646 | + | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
| |||
1686 | 1686 | | |
1687 | 1687 | | |
1688 | 1688 | | |
1689 | | - | |
| 1689 | + | |
1690 | 1690 | | |
1691 | 1691 | | |
1692 | 1692 | | |
| |||
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
1863 | | - | |
| 1863 | + | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
| |||
0 commit comments