[clang] [clang-format] Stop crashing on slightly off Verilog module headers (PR #116000)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 23 06:23:54 PST 2024
================
@@ -2598,6 +2598,20 @@ TEST_F(TokenAnnotatorTest, UnderstandsVerilogOperators) {
Tokens = Annotate("x = '{\"\"};");
ASSERT_EQ(Tokens.size(), 8u) << Tokens;
EXPECT_TOKEN(Tokens[4], tok::string_literal, TT_Unknown);
+
+ // Module headers.
+ Tokens = Annotate("module x();\nendmodule");
----------------
owenca wrote:
This (and other testcases below) should be broken up into two lines:
```c++
Tokens = Annotate("module x();\n"
"endmodule");
```
https://github.com/llvm/llvm-project/pull/116000
More information about the cfe-commits
mailing list