diff options
author | Daniel Jasper <djasper@google.com> | 2014-10-28 17:06:04 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-10-28 17:06:04 +0000 |
commit | 2ad0aba610052c5262c382b428079d3e7d3e3987 (patch) | |
tree | 8f41f9bd7ebfd302ddd15806d53f3270baacb073 /clang/unittests/Format/FormatTest.cpp | |
parent | 241ae2cecfb7d670824fa4edeecec4c3a507b4aa (diff) | |
download | bcm5719-llvm-2ad0aba610052c5262c382b428079d3e7d3e3987.tar.gz bcm5719-llvm-2ad0aba610052c5262c382b428079d3e7d3e3987.zip |
clang-format: Improve function declaration detection.
Before:
ReturnType MACRO
FunctionName() {}
After:
ReturnType MACRO
FunctionName() {}
This fixes llvm.org/PR21404.
I wonder what the motivation for that if-condition was. But as no test
breaks, ...
llvm-svn: 220801
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 40231adabc4..37bd5178674 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5269,6 +5269,8 @@ TEST_F(FormatTest, BreaksLongDeclarations) { "LoooooooooooooooooooooooooooooooongFunctionDeclaration();"); verifyFormat("LoooooooooooooooooooooooooooooooooooooooongReturnType\n" "LooooooooooooooooooooooooooooooooooongFunctionDefinition() {}"); + verifyFormat("LoooooooooooooooooooooooooooooooooooooooongReturnType MACRO\n" + "LooooooooooooooooooooooooooooooooooongFunctionDefinition() {}"); verifyFormat("LoooooooooooooooooooooooooooooooooooooooongReturnType const\n" "LooooooooooooooooooooooooooooooooooongFunctionDefinition() {}"); verifyFormat("decltype(LoooooooooooooooooooooooooooooooooooooooongName)\n" |