forked from OSchip/llvm-project
clang-format: [Java] Fix more generics formatting.
Before: < T extends B > T getInstance(Class<T> type); After: <T extends B> T getInstance(Class<T> type); llvm-svn: 221124
This commit is contained in:
parent
89a26f012a
commit
f056f45b77
|
@ -472,7 +472,7 @@ private:
|
|||
return false;
|
||||
break;
|
||||
case tok::less:
|
||||
if (Tok->Previous && !Tok->Previous->Tok.isLiteral() && parseAngle())
|
||||
if ((!Tok->Previous || !Tok->Previous->Tok.isLiteral()) && parseAngle())
|
||||
Tok->Type = TT_TemplateOpener;
|
||||
else {
|
||||
Tok->Type = TT_BinaryOperator;
|
||||
|
|
|
@ -143,6 +143,7 @@ TEST_F(FormatTestJava, Generics) {
|
|||
"public Map<String, ?> getAll() {\n}");
|
||||
|
||||
verifyFormat("public static <R> ArrayList<R> get() {\n}");
|
||||
verifyFormat("<T extends B> T getInstance(Class<T> type);");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestJava, StringConcatenation) {
|
||||
|
|
Loading…
Reference in New Issue