[PATCH] D75791: [clang-format] Added new option IndentExternBlock

Marcus Johnson via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 16:01:34 PDT 2020


I’m wondering if theres a way to tell if an option has been set in the clang-format config file.

If IndentExternBlock is not set, we should default to the old behavior.

As for your suggestion of setting IndentExternBlock to BraceWrapping.AfterExternBlock or negating it, neither way works with the tests.

> On Mar 26, 2020, at 10:33 AM, MyDeveloperDay via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> MyDeveloperDay added a comment.
> 
> Could the default be `Style.IndentExternBlock = Style.BraceWrapping.AfterExternBlock`
> 
> Then it would match the prior behaviour off AddLevel being `true` when AfterExternBlock is `true`
> 
>  extern "C" {
>  int a;
>  }
> 
>  extern "C" 
>  {
>    int a;
>  }
> 
> 
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D75791/new/
> 
> https://reviews.llvm.org/D75791
> 
> 
> 


More information about the cfe-commits mailing list