diff options
author | Daniel Jasper <djasper@google.com> | 2014-05-05 13:48:09 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-05-05 13:48:09 +0000 |
commit | f10a28d705d0e8c0300561d8e7991b735cf0a23a (patch) | |
tree | cca2c88ceeac73a43eaf5a793ee3b52f7358f253 /clang/unittests/Format/FormatTest.cpp | |
parent | 76f98f8047dee94a3131f733ed99fb6fc23a0cfc (diff) | |
download | bcm5719-llvm-f10a28d705d0e8c0300561d8e7991b735cf0a23a.tar.gz bcm5719-llvm-f10a28d705d0e8c0300561d8e7991b735cf0a23a.zip |
clang-format: Understand functions with decltype return type.
Before:
decltype(long_name_forcing_break)
f() {}
After:
decltype(long_name_forcing_break)
f() {}
llvm-svn: 207965
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-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 d1f4c86bda8..e80d1e3d112 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4840,6 +4840,8 @@ TEST_F(FormatTest, BreaksLongDeclarations) { "LooooooooooooooooooooooooooooooooooongFunctionDefinition() {}"); verifyFormat("LoooooooooooooooooooooooooooooooooooooooongReturnType const\n" "LooooooooooooooooooooooooooooooooooongFunctionDefinition() {}"); + verifyFormat("decltype(LoooooooooooooooooooooooooooooooooooooooongName)\n" + "LooooooooooooooooooooooooooooooooooongFunctionDefinition() {}"); // FIXME: Without the comment, this breaks after "(". verifyFormat("LoooooooooooooooooooooooooooooooooooooooongType // break\n" |