aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2017-09-27 17:57:50 +0000
committerNico Weber <nicolasweber@gmx.de>2017-09-27 17:57:50 +0000
commitb9b18675193cd7410eae2cb5bebf3c2b93a3feaa (patch)
tree0865ee6d77737e227c2c8ef2be56a7c95966c086 /clang/unittests/Format/FormatTestJava.cpp
parent022cc6c41e3711c61a86f12ab7bea010ad72ed88 (diff)
downloadllvm-b9b18675193cd7410eae2cb5bebf3c2b93a3feaa.zip
llvm-b9b18675193cd7410eae2cb5bebf3c2b93a3feaa.tar.gz
llvm-b9b18675193cd7410eae2cb5bebf3c2b93a3feaa.tar.bz2
clang-format/java: Unbreak genenrics formatting after r299952.
https://reviews.llvm.org/rL299952 merged '>>>' tokens into a single JavaRightLogicalShift token. This broke formatting of generics nested more than two deep, e.g. Foo<Bar<Baz>>> because the '>>>' now weren't three '>' for parseAngle(). Luckily, just deleting JavaRightLogicalShift fixes things without breaking the test added in r299952, so do that. https://reviews.llvm.org/D38291 llvm-svn: 314325
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJava.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp
index 408fdaa..2f376f7 100644
--- a/clang/unittests/Format/FormatTestJava.cpp
+++ b/clang/unittests/Format/FormatTestJava.cpp
@@ -333,6 +333,11 @@ TEST_F(FormatTestJava, Generics) {
verifyFormat("Iterable<? extends SomeObject> a;");
verifyFormat("A.<B>doSomething();");
+ verifyFormat("A.<B<C>>doSomething();");
+ verifyFormat("A.<B<C<D>>>doSomething();");
+ verifyFormat("A.<B<C<D<E>>>>doSomething();");
+
+ verifyFormat("OrderedPair<String, List<Box<Integer>>> p = null;");
verifyFormat("@Override\n"
"public Map<String, ?> getAll() {}");