cppfront
cppfront copied to clipboard
[BUG] Infinite recursion in block parameter named after initializing capture
Title: Infinite recursion in block parameter named after initializing capture.
Minimal reproducer (https://cpp2.godbolt.org/z/cKjndzxYn):
main: () = {
test_overloads := 0;
_ = :() = {
(test_overloads := test_overloads$) { }
};
}
Commands:
cppfront main.cpp2
clang++-18 -std=c++26 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -Werror=unused-value -Werror=unused-parameter -Werror=unused-variable -I . main.cpp
Expected result: A working program (-Werror=unused-variable notwithstanding).
Actual result and error:
Output:
Killed - processing time exceeded
Program terminated with signal: SIGKILL
Compiler returned: 143
See also:
- #880.
- #1312.
I object to this being well-formed for the same reason as #1312. It should however be an error and not an infinite loop. :D