diff options
author | Alexander Kornienko <alexfh@google.com> | 2013-06-12 19:04:12 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2013-06-12 19:04:12 +0000 |
commit | f370ad905571dd9e51b26eee7d75ceb95268a771 (patch) | |
tree | 2b2261419ffb3f66eb2861257d2e0046a2148166 /clang/lib/Format/Format.cpp | |
parent | 969e70265a5337153c4044922cf1e452c6715642 (diff) | |
download | bcm5719-llvm-f370ad905571dd9e51b26eee7d75ceb95268a771.tar.gz bcm5719-llvm-f370ad905571dd9e51b26eee7d75ceb95268a771.zip |
Preserve newlines before block comments in static initializers.
Summary:
Basically, don't special-case line comments in this regard. And fixed
an incorrect test, that relied on the wrong behavior.
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D962
llvm-svn: 183851
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 55107765f1f..e0a05b64ecc 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -556,7 +556,7 @@ private: if (!DryRun) { unsigned NewLines = 1; - if (Current.Type == TT_LineComment) + if (Current.is(tok::comment)) NewLines = std::max( NewLines, std::min(Current.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1)); |