'How to specify suboptions for clang-format?

In the .clang-format file I can say:

BasedOnStyle: LLVM
BreakBeforeBraces: Custom
BraceWrapping:
    AfterClass: false
    AfterFunction: true 

How do I specify the same on the command line? (For some reason using .clang-format is not an option.)

I tried:

--style="{BasedOnStyle: LLVM, BreakBeforeBraces: Custom, BraceWrapping:, AfterClass: false, AfterFunction: true}"

and

--style="{BasedOnStyle: LLVM, BreakBeforeBraces: Custom, BraceWrapping: AfterClass: false, BraceWrapping: AfterFunction: true}"

as well as some other variations using BraceWrapping.Afterclass, BraceWrapping:AfterClass, BraceWrappingAfterClass, etc.

I also tried:

--style="{BreakBeforeBraces: Custom, BraceWrapping: [{AfterClass: false}, {AfterFunction: true}]}"

which attempt was based on: Running clang-format with command line: specify IncludeCategories

and some further variants of this. No luck so far...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source