[PATCH] D57184: [clang-format] Allow configuring list of function-like macros that resolve to a type

2019-05-29 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361986: [clang-format] Allow configuring list of function-like macros that resolve to a… (authored by Typz, committed by ). Changed prior to commit: https://reviews.llvm.org/D57184?vs=201395=201962#toc

[PATCH] D37813: clang-format: better handle namespace macros

2019-06-06 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37813/new/ https://reviews.llvm.org/D37813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-06-06 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping ? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50147: clang-format: support external styles

2019-06-06 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50147/new/ https://reviews.llvm.org/D50147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37813: clang-format: better handle namespace macros

2019-06-06 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 203425. Typz added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37813/new/ https://reviews.llvm.org/D37813 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp

[PATCH] D37813: clang-format: better handle namespace macros

2019-06-06 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362740: clang-format: better handle namespace macros (authored by Typz, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST

[PATCH] D50147: clang-format: support external styles

2019-05-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 201693. Typz marked 3 inline comments as done. Typz added a comment. Herald added subscribers: ormris, mgorny. - Rebased - Adapt styles search path to platform conventions - Allow customizing search path at compile time - Allow overriding search path at runtime

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-06-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 204015. Typz added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 Files: lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2019-06-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 203987. Typz added a comment. Herald added a project: clang. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D32478/new/ https://reviews.llvm.org/D32478 Files: docs/ClangFormatStyleOptions.rst

[PATCH] D57184: [clang-format] Allow configuring list of function-like macros that resolve to a type

2019-05-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Herald added a project: clang. Regarding variable/setting names, one issue I see is that these macros are not really type //names// IMO : the macro name is just part of the type (like a template), and its invocation is a type declaration. So maybe renaming to `Typedecl`

[PATCH] D37813: clang-format: better handle namespace macros

2019-05-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. The patch goal is indeed to indent the content of namespace-macro blocks like the content of any 'regular' namespace. So it should look like the content of a namespace, possibly depending on the choose style options. To sumarize, here is a detailed summary of the

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-05-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Herald added a project: clang. ping ? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57184: [clang-format] Allow configuring list of function-like macros that resolve to a type

2019-05-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz accepted this revision. Typz added a comment. This revision is now accepted and ready to land. Actually, looking at all the other options, the same is true for all other macro kind of macros (NamespaceMacros...). Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D50147: clang-format: support external styles

2019-05-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Herald added a project: clang. In D50147#1310146 , @sammccall wrote: > In D50147#1309880 , @Typz wrote: > > > ping? > > > Sorry for losing track of this. > > I think `-style=` is a logical

[PATCH] D37813: clang-format: better handle namespace macros

2019-05-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > Ah, wow, I see what confused me now: > In the fixNamespaceEndComment tests you use an indent that clang-format > would not produce. Can you please fix that, otherwise I find this super > confusing :) Can you point a specific exemple (in code) ? There are many tests

[PATCH] D37813: clang-format: better handle namespace macros

2019-05-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 2 inline comments as done. Typz added inline comments. Comment at: unittests/Format/NamespaceEndCommentsFixerTest.cpp:526 EXPECT_EQ("namespace A {\n" " int i;\n" "} // namespace A", Should I also fix these tests? They

[PATCH] D50147: clang-format: support external styles

2019-08-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50147/new/ https://reviews.llvm.org/D50147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70305: clang-format: fix regression in middle pointer alignment

2019-11-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Typz added reviewers: MyDeveloperDay, klimek, sammccall. Herald added a project: clang. a75f8d98d7ac introduced a regression with Middle pointer alignment, which this patch fixes. Repository:

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2019-10-25 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 2 inline comments as done. Typz added inline comments. Comment at: clang/include/clang/Format/Format.h:187 /// expressions. - /// - /// Specifically, this aligns operands of a single expression that needs to be - /// split over multiple lines, e.g.: - ///

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2019-10-25 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 226393. Typz added a comment. Rebase on top of D50078 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D32478/new/ https://reviews.llvm.org/D32478 Files:

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 226218. Typz marked 2 inline comments as done. Typz added a comment. Fix corner in previous rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 Files:

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 226246. Typz added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:5739 + " ? ccc\n" + " : ddd;"); verifyFormat("bool aa = a //\n" MyDeveloperDay

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 226245. Typz added a comment. Fix earlier error in patch upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-25 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 226380. Typz added a comment. Implement a fallback to regularly indented alignment when the question mark is wrapped. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-25 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 3 inline comments as done. Typz added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1125 + if (Current.is(TT_ConditionalExpr) && Current.is(tok::question) && + ((Current.MustBreakBefore) || + (Current.getNextNonComment() &&

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 226163. Typz added a comment. Rebased on master, integrating required code from https://reviews.llvm.org/D32478 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 Files:

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2019-10-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. This actually depends on another Diff : https://reviews.llvm.org/D32478 That other change introduces the ability to "unindent operator", which is required here; however, it also changes AlignOperands to have more than 2 modes, which does not seem to be acceptable. Before

[PATCH] D50147: clang-format: support external styles

2019-11-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D50147#1648786 , @sammccall wrote: > > First and forehand, I have a problem to solve in my organization : we have > > many projects, and maintaining the config file in some many repositories is > > not practical. > > In some

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-04-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Thanks for trying the patch, too bad it does not work... I will see how to get the required setup/env, but it will probably take some time (esp. in the current situation). Thanks again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2020-04-22 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Typz marked 2 inline comments as done. Closed by commit rG3d61b1120e82: clang-format: Introduce stricter AlignOperands flag (authored by Typz). Changed prior to commit:

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-04-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D50078#1998398 , @dyung wrote: > Hi, this change that you submitted in commit > 5daa25fd7a184524759b6ad065a8bd7e95aa149a > seems > to be causing the test

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-04-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked an inline comment as done. Typz added a comment. Typz added inline comments. Comment at: clang/lib/Format/WhitespaceManager.h:163 +// it does not increase the indent for "chained" conditionals. +int ConditionalsLevel; + This field is not

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-04-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D50078#1998578 , @hokein wrote: > In D50078#1998520 , @Typz wrote: > > > In D50078#1998398 , @dyung wrote: > > > > > Hi, this change that you

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 264234. Typz added a comment. Fix random crash on windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/ https://reviews.llvm.org/D50078 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-15 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4db94094b469: clang-format: support aligned nested conditionals formatting (authored by Typz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50078/new/

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-06 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Still no change with a windows or s390x machine, but i could reproduce the/a problem systematically on linux by enabling sanitizer. In this case, initializing ConditionalsLevel to 0 in constructor does index fix this issue (and initializing to 1 ensures the issue happens,

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D50078#2050623 , @MyDeveloperDay wrote: > I get the point about Opt In, and if we are going to add an option it needs > to go in ASAP otherwise too many people will then start complaining it was on > by default before. > > To

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Indeed, I saw the emails, but I didn't have time to check or investigate the issues. As for E, this is more tricky than this. At the moment, the code does not look at what is in the first "branch" of the ternary operator : it does not care if this is a nested ternary

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Regarding `?:`, this is definitely not considered, and should be relatively easy to handle. Regarding case `D`, this looks like a bug... The break in the first operand is kind of unexpected (as in "not the usual case"), and I had many such corner cases while making and

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D50078#2055227 , @srj wrote: > > And I also think it should be on by default instead of modifying many > > .clang-format files. So IMHO if we add an option, it should be opt-out. > > I can live with it being opt-out. My big

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Could this also be causing https://bugs.llvm.org/show_bug.cgi?id=33896 ? I'll try to see if changes something in that case... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85600/new/ https://reviews.llvm.org/D85600

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D85600#2209545 , @Typz wrote: > Could this also be causing https://bugs.llvm.org/show_bug.cgi?id=33896 ? > > I'll try to see if changes something in that case... Actually, I can confirm this is unrelated.

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1360 + if (Style.AlignOperands == FormatStyle::OAS_AlignAfterOperator) +NewParenState.UnindentOperator = true; + // Mark indentation as alignment if the expression is aligned.

[PATCH] D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign

2020-06-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:6287 + Style.BreakBeforeTernaryOperators = false; + verifyFormat("int x = aaa ? aa :\n" + "? cc :\n"

<    1   2   3   4