Before:
@SuppressWarnings
(value = "unchecked") public void doSomething() { .. }
After:
@SuppressWarnings(value = "unchecked")
public void doSomething() { .. }
llvm-svn: 220279
if (Left->Type == TT_AttributeParen)
CurrentToken->Type = TT_AttributeParen;
+ if (Left->Previous && Left->Previous->Type == TT_JavaAnnotation)
+ CurrentToken->Type = TT_JavaAnnotation;
if (!HasMultipleLines)
Left->PackingKind = PPK_Inconclusive;
Left.Previous->is(tok::char_constant))
return true;
} else if (Style.Language == FormatStyle::LK_Java) {
- if (Left.Type == TT_JavaAnnotation && Line.MightBeFunctionDecl)
+ if (Left.Type == TT_JavaAnnotation && Right.isNot(tok::l_paren) &&
+ Line.MightBeFunctionDecl)
return true;
}
verifyFormat("@Override\n"
"@Nullable\n"
"public String getNameIfPresent() {\n}");
+
+ verifyFormat("@SuppressWarnings(value = \"unchecked\")\n"
+ "public void doSomething() {\n}");
+
verifyFormat("@Partial @Mock DataLoader loader;");
}