diff options
| author | Daniel Jasper <djasper@google.com> | 2015-08-24 15:10:01 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2015-08-24 15:10:01 +0000 |
| commit | 788ffd71c6c5ccdf63fbe0b82fbee4d2ea225bb3 (patch) | |
| tree | f5875f19a8a509596a27c0cd677f84be6a0b70cc /clang/unittests/Format | |
| parent | e6f52102a348add8a47572c5e2fdf24a1fcf2a5a (diff) | |
| download | bcm5719-llvm-788ffd71c6c5ccdf63fbe0b82fbee4d2ea225bb3.tar.gz bcm5719-llvm-788ffd71c6c5ccdf63fbe0b82fbee4d2ea225bb3.zip | |
clang-format: Always allow break after leading annotations.
Before:
DEPRECATED("Use NewClass::NewFunction instead.") int OldFunction(
const string ¶meter) {}
Could not be formatted at all, as clang-format would both require and
disallow the break before "int".
llvm-svn: 245846
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 37516973929..2bcc678cbb4 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3900,6 +3900,8 @@ TEST_F(FormatTest, BreaksFunctionDeclarationsWithTrailingTokens) { TEST_F(FormatTest, FunctionAnnotations) { verifyFormat("DEPRECATED(\"Use NewClass::NewFunction instead.\")\n" + "int OldFunction(const string ¶meter) {}"); + verifyFormat("DEPRECATED(\"Use NewClass::NewFunction instead.\")\n" "string OldFunction(const string ¶meter) {}"); verifyFormat("template <typename T>\n" "DEPRECATED(\"Use NewClass::NewFunction instead.\")\n" |

