This revision was automatically updated to reflect the committed changes.
Closed by commit rL332436: clang-format: Allow optimizer to break template
declaration. (authored by Typz, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D42684?
Typz updated this revision to Diff 147005.
Typz marked 3 inline comments as done.
Typz added a comment.
Rebase on latest master & address review comments
Repository:
rC Clang
https://reviews.llvm.org/D42684
Files:
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Forma
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Some last comments, but basically looks good.
Comment at: include/clang/Format/Format.h:352
- /// \brief If ``true``, always break after the ``template<...>`` of a
temp
Typz added a comment.
@djasper : ping?
Repository:
rC Clang
https://reviews.llvm.org/D42684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Typz added a comment.
ping?
Repository:
rC Clang
https://reviews.llvm.org/D42684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Typz added a comment.
ping?
Repository:
rC Clang
https://reviews.llvm.org/D42684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Typz updated this revision to Diff 136557.
Typz added a comment.
Change options values to No/MultiLine/Yes.
Repository:
rC Clang
https://reviews.llvm.org/D42684
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cp
djasper added a comment.
In https://reviews.llvm.org/D42684#1022219, @Typz wrote:
> Indeed, seems to apply to classes as well. Maybe I was mislead by my testing,
> where I did not get the case (possibly because we use
> `ConstructorInitializerAllOnOneLineOrOnePerLine=true`, so the continuation
Typz added a comment.
Indeed, seems to apply to classes as well. Maybe I was mislead by my testing,
where I did not get the case (possibly because we use
`ConstructorInitializerAllOnOneLineOrOnePerLine=true`, so the continuation
indenter only sees "short" class declarations unless breaking the
djasper added a comment.
In https://reviews.llvm.org/D42684#1022093, @Typz wrote:
> The problem I have is really related to the current
> `AlwaysBreakTemplateDeclarations` behavior, which does not apply to functions.
> I set it to false, and I get this:
>
> template<>
> void aaa
Typz added a comment.
The problem I have is really related to the current
`AlwaysBreakTemplateDeclarations` behavior, which does not apply to functions.
I set it to false, and I get this:
template<>
void (
const bb
djasper added a comment.
I think it's possible that this is just a bug/oversight. But I don't fully
understand the case where it is not behaving as you expect. Can you give me an
example (config setting + code that's not formatted as you expect)?
Repository:
rC Clang
https://reviews.llvm.or
Typz added a comment.
In https://reviews.llvm.org/D42684#1013005, @djasper wrote:
> Please given an explanation of what you are trying to achieve with this
> change. Do you intend to set the penalty high so that clang-format does other
> things first before falling back to wrapping template dec
djasper added a comment.
Please given an explanation of what you are trying to achieve with this change.
Do you intend to set the penalty high so that clang-format does other things
first before falling back to wrapping template declarations?
Why treat separate declarations differently wrt. wra
Typz added a comment.
ping?
Repository:
rC Clang
https://reviews.llvm.org/D42684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Typz updated this revision to Diff 132341.
Typz added a comment.
If the template declaration spans multiple lines, force wrap before the
function/class declaration
Repository:
rC Clang
https://reviews.llvm.org/D42684
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.c
Typz updated this revision to Diff 132198.
Typz added a comment.
Force wrap after multi-line template declaration
Repository:
rC Clang
https://reviews.llvm.org/D42684
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnota
Typz updated this revision to Diff 131946.
Typz added a comment.
fix commit message
Repository:
rC Clang
https://reviews.llvm.org/D42684
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
unittests/Format/For
Typz created this revision.
Typz added reviewers: krasimir, djasper, klimek.
Introduce ``PenaltyBreakTemplateDeclaration`` to control the penalty,
and change ``AlwaysBreakTemplateDeclarations`` to an enum with 3 modes:
- ``None`` for automatic (e.g. penalty based) wrapping of template
declaratio
19 matches
Mail list logo