diff options
| author | Daniel Jasper <djasper@google.com> | 2014-01-03 11:50:46 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-01-03 11:50:46 +0000 |
| commit | 471fbbaee9b6ea1207cdf744636cd8a26b2253d0 (patch) | |
| tree | ba7cf1e9326fff44fde11cac0027db5c3b93a4f5 /lib/Format/UnwrappedLineParser.cpp | |
| parent | 710b1afb7fa0821cfdf8a8e84eca3801f4984e0b (diff) | |
| download | clang-471fbbaee9b6ea1207cdf744636cd8a26b2253d0.tar.gz clang-471fbbaee9b6ea1207cdf744636cd8a26b2253d0.tar.bz2 clang-471fbbaee9b6ea1207cdf744636cd8a26b2253d0.tar.xz | |
clang-format: Recognize single-line macro usages inside macros.
Before:
#define LIST(L) \
L(FirstElement) L(SecondElement) L(ThirdElement) L(FourthElement) \
L(FifthElement)
After:
#define LIST(L) \
L(FirstElement) \
L(SecondElement) \
L(ThirdElement) \
L(FourthElement) \
L(FifthElement)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
| -rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 90fe3bd786..0087e5eabe 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -719,7 +719,7 @@ void UnwrappedLineParser::parseStructuralElement() { // Recognize function-like macro usages without trailing semicolon. if (FormatTok->Tok.is(tok::l_paren)) { parseParens(); - if (FormatTok->HasUnescapedNewline && + if (FormatTok->NewlinesBefore > 0 && tokenCanStartNewLine(FormatTok->Tok)) { addUnwrappedLine(); return; |
