diff options
author | Daniel Jasper <djasper@google.com> | 2013-09-06 07:54:20 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-09-06 07:54:20 +0000 |
commit | 1c5d9df8d1af0f266923edba8fcb367a51a03d26 (patch) | |
tree | 390bc8bac153490c628dc129b01b5f34bd50ec32 /clang/lib/Format/ContinuationIndenter.h | |
parent | 3b1cc9b858462aa190e3b27089f6f9f8c9dd9bb6 (diff) | |
download | bcm5719-llvm-1c5d9df8d1af0f266923edba8fcb367a51a03d26.tar.gz bcm5719-llvm-1c5d9df8d1af0f266923edba8fcb367a51a03d26.zip |
clang-format: Fix comment formatting bugs in nested blocks.
This fixes two issues:
1) The indent of a line comment was not adapted to the subsequent
statement as it would be outside of a nested block.
2) A missing DryRun flag caused actualy breaks to be inserted in
overly long comments while trying to come up with the best line
breaking decisions.
llvm-svn: 190123
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.h')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.h b/clang/lib/Format/ContinuationIndenter.h index 5d3da4ccf8f..ef698a7a520 100644 --- a/clang/lib/Format/ContinuationIndenter.h +++ b/clang/lib/Format/ContinuationIndenter.h @@ -41,7 +41,8 @@ public: /// \brief Get the initial state, i.e. the state after placing \p Line's /// first token at \p FirstIndent. - LineState getInitialState(unsigned FirstIndent, const AnnotatedLine *Line); + LineState getInitialState(unsigned FirstIndent, const AnnotatedLine *Line, + bool DryRun); // FIXME: canBreak and mustBreak aren't strictly indentation-related. Find a // better home. |