[PATCH] D124749: [clang-format] Handle Verilog preprocessor directives
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 1 23:42:25 PDT 2022
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:1105
+ static const llvm::Regex VerilogToken(
+ "^(\'|``?|\\\\(\\\\(\r?\n|\r)|[^[:space:]])*)");
+
----------------
Consider a raw string, for a better reading.
================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:1129
void FormatTokenLexer::readRawToken(FormatToken &Tok) {
- Lex->LexFromRawLexer(Tok.Tok);
+ if (!(Style.isVerilog() && readRawTokenVerilogSpecific(Tok.Tok)))
+ Lex->LexFromRawLexer(Tok.Tok);
----------------
Otherwise I don't see why you change that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124749/new/
https://reviews.llvm.org/D124749
More information about the cfe-commits
mailing list