mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
063e3fe648
Pull request #65409 changed the brace kind heuristic to not treat a preprocessor if directive as a in statement, however, this caused some regressions. If the contents of a brace don't immediately determine the brace kind, the heuristic will look at the characters immediately before and after the closing brace to determine the brace type. Unfortunately, if the closing brace was preceded by a preprocessor directive, for example `#endif`, the preceding token was `endif`, seen as just an identifier, so the braces were understood as a braced list. This patch fixes this behaviour by skipping all preprocessor directives when calculating brace types. Comments were already being skipped, so now preprocessor lines are skipped alongside comments. Fixes https://github.com/llvm/llvm-project/issues/68404 |
||
---|---|---|
.. | ||
Analysis | ||
AST | ||
ASTMatchers | ||
Basic | ||
CodeGen | ||
CrossTU | ||
DirectoryWatcher | ||
Driver | ||
Format | ||
Frontend | ||
Index | ||
Interpreter | ||
Introspection | ||
Lex | ||
libclang | ||
Rename | ||
Rewrite | ||
Sema | ||
Serialization | ||
StaticAnalyzer | ||
Support | ||
Tooling | ||
CMakeLists.txt |