[PATCH] D31652: [clang-format] Recognize Java logical shift assignment operator
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 6 06:41:15 PDT 2017
thakis added inline comments.
================
Comment at: include/clang/Basic/TokenKinds.def:230
+PUNCTUATOR(greatergreatergreaterequal, ">>>=")
+PUNCTUATOR(lesslesslessequal, "<<<=")
+
----------------
I think this is the wrong approach to go about this. clang is a C compiler, and its tokenizer shouldn't have to know about Java. Instead, this should be handled in the formatter. See tryMergePreviousTokens() in lib/Format/FormatTokenLexer.cpp for how we do this for e.g. => or >>>= etc for JavaScript – just do the same for Java.
Repository:
rL LLVM
https://reviews.llvm.org/D31652
More information about the cfe-commits
mailing list