owenpan added a comment. 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 ... ================ Comment at: clang/lib/Format/TokenAnnotator.cpp:216 FormatToken &OpeningParen = *CurrentToken->Previous; assert(OpeningParen.is(tok::l_paren)); FormatToken *PrevNonComment = OpeningParen.getPreviousNonComment(); ---------------- This patch either uncovers or causes an assertion failure here on a bunch of files in `clang/test`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121550/new/ https://reviews.llvm.org/D121550 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits