llvm-project/clang/unittests/Format
Nico Weber 48c94a6164 [clang-format] Recognize Java logical shift assignment operator
At present, clang-format mangles Java containing logical right shift operators
('>>>=' or '>>>'), splitting them in two, resulting in invalid code:

 public class Minimal {
   public void func(String args) {
     int i = 42;
-    i >>>= 1;
+    i >> >= 1;
     return i;
   }
 }

This adds both forms of logical right shift to the FormatTokenLexer, so
clang-format won't attempt to split them and insert bogus whitespace.

https://reviews.llvm.org/D31652
Patch from Richard Bradfield <bradfier@fstab.me>!

llvm-svn: 299952
2017-04-11 15:50:04 +00:00
..
CMakeLists.txt [clang-format] Add a NamespaceEndCommentsFixer 2017-02-27 13:28:36 +00:00
CleanupTest.cpp [clang-format] revert an unintended change in r288493 and add a test case. 2016-12-19 10:41:05 +00:00
FormatTest.cpp [clang-format] Handle NSString literals by merging tokens. 2017-04-11 09:55:00 +00:00
FormatTestComments.cpp Fix r296605 so that stuff in #ifndef SWIG blocks is still formatted. 2017-03-01 11:10:11 +00:00
FormatTestJS.cpp clang-format: [JS] fix whitespace around "of" operator. 2017-04-05 10:56:07 +00:00
FormatTestJava.cpp [clang-format] Recognize Java logical shift assignment operator 2017-04-11 15:50:04 +00:00
FormatTestObjC.cpp clang-format: Make GetStyle return Expected<FormatStyle> instead of FormatStyle 2017-01-17 00:12:27 +00:00
FormatTestProto.cpp clang-format: Make it very slighly more expensive to wrap between "= {". 2017-03-14 00:40:32 +00:00
FormatTestSelective.cpp [clang-format] Implement comment reflowing. 2017-01-25 13:58:58 +00:00
FormatTestUtils.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
NamespaceEndCommentsFixerTest.cpp [clang-format] fix crash in NamespaceEndCommentsFixer (PR32438) 2017-04-04 20:11:13 +00:00
SortImportsTestJS.cpp clang-format: [JS] Fix line breaks before comments when sorting imports. 2016-09-19 07:02:34 +00:00
SortIncludesTest.cpp clang-format: Correctly calculate affected ranges when sorting #includes. 2016-08-30 21:33:41 +00:00