Fixes https://github.com/llvm/llvm-project/issues/54350
As driveby rename Left to OpeningParen, this gives a better overview what it is, and we have a loop in the function, where Left is not adjusted.
Differential D121550
[clang-format] Fix crash on invalid requires expression HazardyKnusperkeks on Mar 13 2022, 5:22 AM. Authored by
Details Fixes https://github.com/llvm/llvm-project/issues/54350 As driveby rename Left to OpeningParen, this gives a better overview what it is, and we have a loop in the function, where Left is not adjusted.
Diff Detail
Event Timeline
Comment Actions Split rename and bug fix
Comment Actions LGTM. And thanks for splitting the patch.
Comment Actions After applying this patch, we got a different assertion failure on a bunch of files in clang/test, e.g.: ~/llvm-project/clang$ for f in $(find . -name \*.cpp -o -name \*.c) ; do clang-format $f > /dev/null ; done Assertion failed: (OpeningParen.is(tok::l_paren)), function parseParens, file TokenAnnotator.cpp, line 216. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: cf ./test/Driver/ignore-xcoff-visibility.cpp ...
|
Maybe you can commit the rename as a NFC commit and rebase the patch to remove the noise?