[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-09 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310539: clang-format: Fix bug with ENAS_DontAlign and empty lines (authored by jtbandes). Repository: rL LLVM https://reviews.llvm.org/D36019 Files: cfe/trunk/lib/Format/WhitespaceManager.cpp

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-07 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added a comment. Thanks. Can you commit this when you get a chance? I don't have permissions. https://reviews.llvm.org/D36019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-06 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Thanks you. Comment at: lib/Format/WhitespaceManager.cpp:650 +for (unsigned i = 0; i < Newlines; ++i) + Text.append(UseCRLF ? " \\\r\n" : " \\\n"); +return;

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-05 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:650 +for (unsigned i = 0; i < Newlines; ++i) + Text.append(UseCRLF ? " \\\r\n" : " \\\n"); +return; djasper wrote: > Note that when you have an empty line, this would turn

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-05 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes updated this revision to Diff 109898. jtbandes added a comment. @djasper ok, done https://reviews.llvm.org/D36019 Files: lib/Format/WhitespaceManager.cpp lib/Format/WhitespaceManager.h unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-04 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:650 +for (unsigned i = 0; i < Newlines; ++i) + Text.append(UseCRLF ? " \\\r\n" : " \\\n"); +return; Note that when you have an empty line, this would turn into: #define A

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-03 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added a comment. @djasper Bump :) https://reviews.llvm.org/D36019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-07-31 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes updated this revision to Diff 108863. jtbandes added a comment. - Undo change in argument list https://reviews.llvm.org/D36019 Files: lib/Format/WhitespaceManager.cpp lib/Format/WhitespaceManager.h unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-07-31 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes updated this revision to Diff 108860. jtbandes added a comment. Okay, I think this approach is better: - Rename the version of `appendNewlineText` used for escaped newlines to `appendEscapedNewlineText` to reduce confusability. - If `ENAS_DontAlign`, skip all of the offset calculation

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-07-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Could you explain this in more detail? Which subtraction is underflowing? Why can't we just add a ternary expression there to handle the case? https://reviews.llvm.org/D36019 ___ cfe-commits mailing list

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-07-28 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes created this revision. Herald added a subscriber: klimek. This fixes a bug in `ENAS_DontAlign` (introduced in https://reviews.llvm.org/D32733) where blank lines had an EscapedNewlineColumn of 0, causing a subtraction to overflow when converted back to `unsigned` and leading to runaway