mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-11 08:48:12 +00:00
clang-format: Fix bad memory access.
llvm-svn: 226680
This commit is contained in:
parent
f3a7da349c
commit
d1debfc2bb
@ -683,6 +683,7 @@ private:
|
||||
TT_TrailingReturnArrow))
|
||||
CurrentToken->Type = TT_Unknown;
|
||||
CurrentToken->Role.reset();
|
||||
CurrentToken->MatchingParen = nullptr;
|
||||
CurrentToken->FakeLParens.clear();
|
||||
CurrentToken->FakeRParens = 0;
|
||||
}
|
||||
|
@ -2612,6 +2612,7 @@ TEST_F(FormatTest, MacroDefinitionsWithIncompleteCode) {
|
||||
verifyFormat("#if \"a");
|
||||
|
||||
verifyNoCrash("#if a\na(\n#else\n#endif\n{a");
|
||||
verifyNoCrash("a={0,1\n#if a\n#else\n;\n#endif\n}");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) {
|
||||
|
Loading…
Reference in New Issue
Block a user