Skip to content

Commit 45c25b7

Browse files
committed
Comments
1 parent d3671a5 commit 45c25b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Format/UnwrappedLineParser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4856,8 +4856,7 @@ void UnwrappedLineParser::readToken(int LevelDifference) {
48564856
FirstNonCommentOnLine) {
48574857
// In Verilog, the backtick is used for macro invocations. In TableGen,
48584858
// the single hash is used for the paste operator.
4859-
const FormatToken *Next = Tokens->peekNextToken();
4860-
assert(Next); // There is an EOF token at the end.
4859+
const auto *Next = Tokens->peekNextToken();
48614860
if ((Style.isVerilog() && !Keywords.isVerilogPPDirective(*Next)) ||
48624861
(Style.isTableGen() &&
48634862
!Next->isOneOf(tok::kw_else, tok::pp_define, tok::pp_ifdef,

clang/unittests/Format/FormatTestTableGen.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ TEST_F(FormatTestTableGen, PasteOperator) {
218218
" string Z = [\"Traring\", \"Paste\", \"Traring\", \"Paste\",\n"
219219
" \"Traring\", \"Paste\"]#;\n"
220220
"}");
221+
221222
verifyFormat("def x#x {}", "def x\n"
222223
"#x {}");
223224
verifyFormat("def x#x {}", "def x\n"

0 commit comments

Comments
 (0)