aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Process.cpp
diff options
context:
space:
mode:
authorsstwcw <f0gukp2nk@protonmail.com>2022-06-26 01:25:39 +0000
committersstwcw <f0gukp2nk@protonmail.com>2022-06-26 01:27:27 +0000
commit370bee480139bd37fe8c0c8c03ecd19ed9223f01 (patch)
tree96274be7617eb369ff2887b3577c7f227767270c /llvm/lib/Support/Process.cpp
parentb2cb7e81f8978ccce5c5e7b316480b88785ca9cc (diff)
downloadllvm-370bee480139bd37fe8c0c8c03ecd19ed9223f01.zip
llvm-370bee480139bd37fe8c0c8c03ecd19ed9223f01.tar.gz
llvm-370bee480139bd37fe8c0c8c03ecd19ed9223f01.tar.bz2
[clang-format] Fix whitespace counting stuff
The current way of counting whitespace would count backticks as whitespace. For Verilog stuff we need backticks to be handled correctly. For JavaScript the current way is to compare the entire token text to see if it's a backtick. However, when the backtick is the first token following an escaped newline, the escaped newline will be part of the tok::unknown token. Verilog has macros and escaped newlines unlike JavaScript. So we can't regard an entire tok::unknown token as whitespace. Previously, the start of every token would be matched for newlines. Now, it is all whitespace instead of just newlines. The column counting problem has already been fixed for JavaScript in e71b4cbdd140f059667f84464bd0ac0ebc348387 by counting columns elsewhere. Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D124748
Diffstat (limited to 'llvm/lib/Support/Process.cpp')
0 files changed, 0 insertions, 0 deletions