Page MenuHomePhabricator

Typz (Francois Ferrand)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 25 2017, 12:43 AM (129 w, 11 h)

Recent Activity

Aug 28 2019

Typz added a comment to D50147: clang-format: support external styles.

ping?

Aug 28 2019, 4:36 AM · Restricted Project, Restricted Project

Jun 11 2019

Typz updated the diff for D50078: clang-format: support aligned nested conditionals formatting.

Rebase

Jun 11 2019, 4:36 AM · Restricted Project, Restricted Project
Typz updated the diff for D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set.

Rebase

Jun 11 2019, 1:52 AM · Restricted Project, Restricted Project

Jun 7 2019

Typz added a comment to D50147: clang-format: support external styles.

One thing that's unclear to me is whether your aim is to

  1. solve a concrete problem for your organization
  2. solve a family of problems for similar organizations
  3. add a new way of configuring styles for many types of users/projects
Jun 7 2019, 3:14 AM · Restricted Project, Restricted Project

Jun 6 2019

Typz added a child revision for D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set: D50078: clang-format: support aligned nested conditionals formatting.
Jun 6 2019, 1:40 PM · Restricted Project, Restricted Project
Typz added a parent revision for D50078: clang-format: support aligned nested conditionals formatting: D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set.
Jun 6 2019, 1:40 PM · Restricted Project, Restricted Project
Typz committed rGe8a301f87f75: clang-format: better handle namespace macros (authored by Typz).
clang-format: better handle namespace macros
Jun 6 2019, 1:04 PM
Typz committed rL362740: clang-format: better handle namespace macros.
clang-format: better handle namespace macros
Jun 6 2019, 1:04 PM
Typz closed D37813: clang-format: better handle namespace macros.
Jun 6 2019, 1:04 PM · Restricted Project, Restricted Project
Typz updated the diff for D37813: clang-format: better handle namespace macros.

Rebase

Jun 6 2019, 1:02 PM · Restricted Project, Restricted Project
Typz added a comment to D50147: clang-format: support external styles.

ping?

Jun 6 2019, 6:58 AM · Restricted Project, Restricted Project
Typz added a comment to D50078: clang-format: support aligned nested conditionals formatting.

ping ?

Jun 6 2019, 6:58 AM · Restricted Project, Restricted Project
Typz added a comment to D37813: clang-format: better handle namespace macros.

ping?

Jun 6 2019, 6:55 AM · Restricted Project, Restricted Project

May 29 2019

Typz committed rGc5227a1f5310: [clang-format] Allow configuring list of function-like macros that resolve to a… (authored by Typz).
[clang-format] Allow configuring list of function-like macros that resolve to a…
May 29 2019, 9:31 AM
Typz committed rL361986: [clang-format] Allow configuring list of function-like macros that resolve to a….
[clang-format] Allow configuring list of function-like macros that resolve to a…
May 29 2019, 9:30 AM
Typz committed rC361986: [clang-format] Allow configuring list of function-like macros that resolve to a….
[clang-format] Allow configuring list of function-like macros that resolve to a…
May 29 2019, 9:30 AM
Typz closed D57184: [clang-format] Allow configuring list of function-like macros that resolve to a type.
May 29 2019, 9:30 AM · Restricted Project
Typz committed rG0a729261e22e: [NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest (authored by Typz).
[NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest
May 29 2019, 9:23 AM
Typz committed rC361984: [NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest.
[NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest
May 29 2019, 9:23 AM
Typz committed rL361984: [NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest.
[NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest
May 29 2019, 9:23 AM
Typz added inline comments to D37813: clang-format: better handle namespace macros.
May 29 2019, 9:22 AM · Restricted Project, Restricted Project
Typz updated the diff for D37813: clang-format: better handle namespace macros.
  • Rebase
  • Fix NamespaceEndCommentsFixerTest to match LLVM indent style
May 29 2019, 8:44 AM · Restricted Project, Restricted Project

May 28 2019

Typz updated the diff for D50147: clang-format: support external styles.
  • Rebased
  • Adapt styles search path to platform conventions
  • Allow customizing search path at compile time
  • Allow overriding search path at runtime through CLANG_FORMAT_STYLES_PATH env variable
May 28 2019, 9:37 AM · Restricted Project, Restricted Project

May 24 2019

Typz added inline comments to D37813: clang-format: better handle namespace macros.
May 24 2019, 9:23 AM · Restricted Project, Restricted Project

May 23 2019

Typz added a comment to D37813: clang-format: better handle namespace macros.

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 :)

May 23 2019, 2:52 AM · Restricted Project, Restricted Project
Herald added a project to D50147: clang-format: support external styles: Restricted Project.

ping?

Sorry for losing track of this.

I think -style=<filename> is a logical extension of the current options. I'm less sure of supporting it in BasedOnStyle, but happy to go either way.

May 23 2019, 12:39 AM · Restricted Project, Restricted Project

May 22 2019

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

Actually, looking at all the other options, the same is true for all other macro kind of macros (NamespaceMacros...).

May 22 2019, 1:35 PM · Restricted Project
Herald added a project to D57184: [clang-format] Allow configuring list of function-like macros that resolve to a type: Restricted Project.

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 or something like this would be slightly more representative.

May 22 2019, 1:31 PM · Restricted Project
Herald added a project to D50078: clang-format: support aligned nested conditionals formatting: Restricted Project.

ping ?

May 22 2019, 9:37 AM · Restricted Project, Restricted Project
Typz added a comment to D37813: clang-format: better handle namespace macros.

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 observable differences between macros vs normal namespace.

May 22 2019, 9:27 AM · Restricted Project, Restricted Project

May 17 2019

Herald added a project to D37813: clang-format: better handle namespace macros: Restricted Project.

ping ?

May 17 2019, 8:08 AM · Restricted Project, Restricted Project

Nov 27 2018

Typz added a comment to D50078: clang-format: support aligned nested conditionals formatting.

ping ?

Nov 27 2018, 9:13 AM · Restricted Project, Restricted Project
Typz added a comment to D37813: clang-format: better handle namespace macros.

ping?

Nov 27 2018, 8:56 AM · Restricted Project, Restricted Project
Typz added a comment to D50147: clang-format: support external styles.

ping?

Nov 27 2018, 8:55 AM · Restricted Project, Restricted Project

Oct 29 2018

Typz added a comment to D50147: clang-format: support external styles.

Being able to discover the right style from the filesystem is powerful, and if I was going to use this flag, I'd consider symlinking the style-file to subproject/.clang_format instead. That way the setting is persistent and available to all tools, rather than us needing to get it right on each invocation.

Oct 29 2018, 10:41 AM · Restricted Project, Restricted Project
Typz added a comment to D50147: clang-format: support external styles.

The idea here does seem to be a natural extension of -style, at least for the case when the arg is a filename directly. I'm not opposed, happy to review this.

I do want to probe the use case a bit though: we have found that configuring via -style= doesn't scale that well to lots of codebases and tools. e.g. if someone's running clang-tidy or clangd via some driver, are they going to have a way to plumb through the right -style=?

Being able to discover the right style from the filesystem is powerful, and if I was going to use this flag, I'd consider symlinking the style-file to subproject/.clang_format instead. That way the setting is persistent and available to all tools, rather than us needing to get it right on each invocation.

Oct 29 2018, 10:28 AM · Restricted Project, Restricted Project

Oct 4 2018

Typz added a comment to D37813: clang-format: better handle namespace macros.

The problem here is that we have different opinions on how the formatting on namespace macros should behave in the first place- I think they should behave like namespaces, you want them to be formatted differently.
Given that you want full control over the formatting of those macros, and them not actually be formatted exactly like namespaces or classes, I think we need a more generic mechanism for you to express that.

Not sure what you mean here. I want them to behave like namespaces as well, this is actually the use case I have... As implemented, they indeed behave exactly like namespaces :

TESTSUITE(a) {                       namespace a {
} // TESTSUITE(a)                    } // namespace a
                                VS
TESTSUITE(a) { TESTSUITE(b) {        namespace a { namespace b {
} // TESTSUITE(a::b)                 }} // namespace a::b

I thought we had the discussion upthread that they indent differently from namespaces. I'm working on a patch that allows you to configure macros.

Oct 4 2018, 2:59 AM · Restricted Project, Restricted Project

Oct 3 2018

Typz added a comment to D37813: clang-format: better handle namespace macros.

The problem here is that we have different opinions on how the formatting on namespace macros should behave in the first place- I think they should behave like namespaces, you want them to be formatted differently.
Given that you want full control over the formatting of those macros, and them not actually be formatted exactly like namespaces or classes, I think we need a more generic mechanism for you to express that.

Oct 3 2018, 8:39 AM · Restricted Project, Restricted Project

Oct 2 2018

Typz committed rC343602: clang-format: better handle statement macros.
clang-format: better handle statement macros
Oct 2 2018, 9:42 AM
Typz committed rL343602: clang-format: better handle statement macros.
clang-format: better handle statement macros
Oct 2 2018, 9:41 AM
Typz closed D33440: clang-format: better handle statement macros.
Oct 2 2018, 9:41 AM · Restricted Project

Sep 25 2018

Typz added a comment to D50147: clang-format: support external styles.

I don't understand the use-case this patch is realizing. Suppose I have a bunch of projects that have to share a format style. Then I can checkout them under a common root directory and put an appropriate .clang-format file there.

Sep 25 2018, 1:50 AM · Restricted Project, Restricted Project

Sep 4 2018

Typz added a comment to D50147: clang-format: support external styles.

clang-format does indeed support .clang-format, which is great for *isolated* projects, and which is not affected by this patch.

Sep 4 2018, 8:51 AM · Restricted Project, Restricted Project

Aug 1 2018

Typz created D50147: clang-format: support external styles.
Aug 1 2018, 9:50 AM · Restricted Project, Restricted Project
Typz added a comment to D50078: clang-format: support aligned nested conditionals formatting.

Could you clarify how each piece is supposed to be aligned in these examples?
This is what makes me happy:

// column  limit             V
int a = condition1 ? result1
      : conditio2 ? result2
      : loooooooooocondition 
        ? result2
        : dition3 ? resul3
                  : resul4;
// column  limit             V
int a = condition1 
        ? loooooresult1
        : conditio2 ? result2
                    : result4;
Aug 1 2018, 7:22 AM · Restricted Project, Restricted Project
Typz added a comment to D50078: clang-format: support aligned nested conditionals formatting.
  • I'd be ok with the suggestion for BreakBeforeTernaryOperators=true
Aug 1 2018, 6:56 AM · Restricted Project, Restricted Project
Typz added a comment to D37813: clang-format: better handle namespace macros.

This has been stale for a while now. Last comment indicate this is not the right approach, but some prototyping has been done a more generic approach, with no timeline.
I understand this, but in the meantime the problem is still there, with no solution at the moment...

Aug 1 2018, 2:43 AM · Restricted Project, Restricted Project

Jul 31 2018

Typz updated the diff for D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch.

Regenerate documentation

Jul 31 2018, 9:59 AM
Typz updated the diff for D37813: clang-format: better handle namespace macros.

Regeneration documentation

Jul 31 2018, 9:52 AM · Restricted Project, Restricted Project
Typz updated the diff for D33440: clang-format: better handle statement macros.

Regenerate documentation

Jul 31 2018, 9:50 AM · Restricted Project
Typz added a comment to D50078: clang-format: support aligned nested conditionals formatting.

Notes:

  • I choose not to add an option to enable this behavior, as I think of it as just another way clang-format can (better) format the code; but I can one if needed
  • Currently, it relies on another patch (D32478), which supports aligning the wrapped operator slightly differently. If/since that other patch does not seem to make it, I can change this patch to either do the alignment in this specific case (e.g. for wrapped ternary operator only) or to keep the 'default' behavior of clang-format (e.g. the wrapped colon would be aligned with the first condition):
Jul 31 2018, 9:49 AM · Restricted Project, Restricted Project
Typz created D50078: clang-format: support aligned nested conditionals formatting.
Jul 31 2018, 9:31 AM · Restricted Project, Restricted Project
Typz updated the diff for D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set.

rebase

Jul 31 2018, 9:28 AM · Restricted Project, Restricted Project

Jun 14 2018

Typz committed rC334709: clang-format: Fix documentation generation.
clang-format: Fix documentation generation
Jun 14 2018, 6:36 AM
Typz committed rL334709: clang-format: Fix documentation generation.
clang-format: Fix documentation generation
Jun 14 2018, 6:36 AM
Typz closed D48161: clang-format: Fix documentation generation.
Jun 14 2018, 6:36 AM
Typz updated the diff for D48161: clang-format: Fix documentation generation.

rebase

Jun 14 2018, 6:35 AM
Typz updated the diff for D48161: clang-format: Fix documentation generation.

Add missing block, for consistency

Jun 14 2018, 2:23 AM
Typz retitled D48161: clang-format: Fix documentation generation from Fix documentation generation to clang-format: Fix documentation generation.
Jun 14 2018, 2:19 AM
Typz created D48161: clang-format: Fix documentation generation.
Jun 14 2018, 2:18 AM

Jun 12 2018

Typz added a comment to D42787: clang-format: do not add extra indent when wrapping last parameter.

The normal rule for formatting options apply. If you can dig up a public style guide and a project of reasonable size where it is used, we can add an option.

Jun 12 2018, 7:29 AM

Jun 11 2018

Typz committed rL334408: clang-format: Introduce BreakInheritanceList option.
clang-format: Introduce BreakInheritanceList option
Jun 11 2018, 7:46 AM
Typz committed rC334408: clang-format: Introduce BreakInheritanceList option.
clang-format: Introduce BreakInheritanceList option
Jun 11 2018, 7:45 AM
Typz closed D43015: clang-format: Introduce BreakInheritanceList option.
Jun 11 2018, 7:45 AM
Typz updated the diff for D43015: clang-format: Introduce BreakInheritanceList option.

rebase

Jun 11 2018, 7:43 AM

Jun 8 2018

Typz added a comment to D42787: clang-format: do not add extra indent when wrapping last parameter.

Would it be acceptable to introduce an option to allow enabling this behavior?
I mean would it have a chance of being integrated, or must I keep maintaining a fork of clang-format...

Jun 8 2018, 7:18 AM
Typz added a comment to D37813: clang-format: better handle namespace macros.

ping?

Jun 8 2018, 7:09 AM · Restricted Project, Restricted Project
Typz added a comment to D43015: clang-format: Introduce BreakInheritanceList option.

ping?

Jun 8 2018, 7:07 AM

May 17 2018

Typz added inline comments to D33440: clang-format: better handle statement macros.
May 17 2018, 4:51 AM · Restricted Project
Typz updated the diff for D33440: clang-format: better handle statement macros.

Address review comments

May 17 2018, 4:51 AM · Restricted Project

May 16 2018

Typz updated the diff for D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch.

rebase

May 16 2018, 6:57 AM
Typz updated the diff for D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set.

Rebase

May 16 2018, 3:11 AM · Restricted Project, Restricted Project
Typz updated the diff for D37813: clang-format: better handle namespace macros.

Rebase

May 16 2018, 2:53 AM · Restricted Project, Restricted Project
Typz added a comment to D37813: clang-format: better handle namespace macros.

Some initial design work has been done, and Krasimir said that he's interested. No timeline though :(

May 16 2018, 2:53 AM · Restricted Project, Restricted Project
Typz updated the diff for D33440: clang-format: better handle statement macros.

Rebase on latest master

May 16 2018, 2:38 AM · Restricted Project
Typz added a comment to D43015: clang-format: Introduce BreakInheritanceList option.

ping?

May 16 2018, 1:56 AM
Typz updated the diff for D43015: clang-format: Introduce BreakInheritanceList option.

Rebase on latest master

May 16 2018, 1:55 AM
Typz committed rC332436: clang-format: Allow optimizer to break template declaration..
clang-format: Allow optimizer to break template declaration.
May 16 2018, 1:29 AM
Typz committed rL332436: clang-format: Allow optimizer to break template declaration..
clang-format: Allow optimizer to break template declaration.
May 16 2018, 1:29 AM
Typz closed D42684: clang-format: Allow optimizer to break template declaration..
May 16 2018, 1:29 AM
Typz updated the diff for D42684: clang-format: Allow optimizer to break template declaration..

Rebase on latest master & address review comments

May 16 2018, 1:27 AM
Typz committed rL332434: clang-format: tweak formatting of variable initialization blocks.
clang-format: tweak formatting of variable initialization blocks
May 16 2018, 1:07 AM
Typz committed rC332434: clang-format: tweak formatting of variable initialization blocks.
clang-format: tweak formatting of variable initialization blocks
May 16 2018, 1:07 AM
Typz closed D43290: clang-format: tweak formatting of variable initialization blocks.
May 16 2018, 1:07 AM
Typz updated the diff for D43290: clang-format: tweak formatting of variable initialization blocks.

Address review comment & rebase

May 16 2018, 1:04 AM

Mar 22 2018

Typz added a comment to D42684: clang-format: Allow optimizer to break template declaration..

@djasper : ping?

Mar 22 2018, 8:00 AM
Typz added a comment to D43015: clang-format: Introduce BreakInheritanceList option.

@djasper : ping?

Mar 22 2018, 8:00 AM
Typz added a comment to D43290: clang-format: tweak formatting of variable initialization blocks.

@djasper : ping?

Mar 22 2018, 7:57 AM
Typz added a comment to D44765: PR36643 Make clang-format support more generic TMarcos.

You are right, I did not mean it would help with the handling of these macros; but it may be related on the configuration-side of things : adding an option for listing these macros may hit the same limitation, and the same mean of storing (in the code) the list of these macros may be used.

Mar 22 2018, 7:07 AM
Typz added a comment to D44765: PR36643 Make clang-format support more generic TMarcos.

A generic (or at least extandable) approach to specifying macro behaviors was introduced here: https://reviews.llvm.org/D33440

Mar 22 2018, 2:31 AM

Mar 13 2018

Typz added a comment to D42684: clang-format: Allow optimizer to break template declaration..

ping?

Mar 13 2018, 6:30 AM
Typz added a comment to D43015: clang-format: Introduce BreakInheritanceList option.

ping?

Mar 13 2018, 6:29 AM
Typz added a comment to D43290: clang-format: tweak formatting of variable initialization blocks.

ping?

Mar 13 2018, 6:29 AM

Mar 9 2018

Typz added a comment to D42684: clang-format: Allow optimizer to break template declaration..

ping?

Mar 9 2018, 2:39 AM
Typz added a comment to D43290: clang-format: tweak formatting of variable initialization blocks.

ping?

Mar 9 2018, 2:39 AM
Typz added a comment to D43015: clang-format: Introduce BreakInheritanceList option.

ping?

Mar 9 2018, 2:39 AM

Mar 5 2018

Typz added a comment to D43290: clang-format: tweak formatting of variable initialization blocks.

ping?

Mar 5 2018, 6:55 AM

Mar 2 2018

Typz added a comment to D42787: clang-format: do not add extra indent when wrapping last parameter.

Also double-checked with Richard Smith and he agrees that the current behavior is preferable. For comma and plus this doesn't seem overly important, but making it:

aaaaaaaaaa(bbbbbbbbb + ccccccccccc *
                       ddddddddd);

seems really bad to him as this suggests that we are adding both ccccccccccc and ddddddddd.

aaaaaaaaaa(bbbbbbbbb + ccccccccccc *
                           ddddddddd);

seems clearer.

Mar 2 2018, 7:02 AM
Typz added a comment to D42787: clang-format: do not add extra indent when wrapping last parameter.

If people don't care about this case, we might as well merge this :-) Just kidding.

Mar 2 2018, 4:12 AM

Mar 1 2018

Typz updated the diff for D42684: clang-format: Allow optimizer to break template declaration..

Change options values to No/MultiLine/Yes.

Mar 1 2018, 9:58 AM