[PATCH] D100778: [clang-format] Prevent extraneous space insertion in bitshift operators
Luis Penagos via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 21 07:26:02 PDT 2021
penagos added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:125
+ CurrentToken->Next->getStartOfNonWhitespace().getLocWithOffset(
+ -1)))
return false;
----------------
MyDeveloperDay wrote:
> I don't really understand what we are saying here?
Effectively we are checking that, barring intervening whitespace, we are analyzing 2 consecutive '>' tokens. If so, we treat such sequence as a binary op in lieu of a closing template angle bracket. If there's another more straightforward way of accomplishing this check, I'm open to that, but this seemed to be the most straightforward way at the time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100778/new/
https://reviews.llvm.org/D100778
More information about the cfe-commits
mailing list