if (Left.isOneOf(TT_JavaAnnotation, TT_LeadingJavaAnnotation))
return !Right.is(tok::l_paren);
if (Left.is(TT_PointerOrReference))
- return (!Line.IsMultiVariableDeclStmt &&
- Style.PointerAlignment != FormatStyle::PAS_Right) ||
- Right.is(TT_FunctionDeclarationName);
+ return Right.is(TT_FunctionDeclarationName);
if (Right.is(TT_PointerOrReference))
return Line.IsMultiVariableDeclStmt ||
(Style.PointerAlignment == FormatStyle::PAS_Right &&
"typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa\n"
"aaaaaaaaaa<aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
" bool *aaaaaaaaaaaaaaaaaa, bool *aa) {}");
+
+ FormatStyle Style = getLLVMStyle();
+ Style.PointerAlignment = FormatStyle::PAS_Left;
+ verifyFormat("void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaa* const aaaaaaaaaaaa) {}",
+ Style);
}
TEST_F(FormatTest, TrailingReturnType) {