MyDeveloperDay added inline comments.

Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1088
       if (FormatTok-> {
-        if (Style.BraceWrapping.AfterExternBlock) {
-          parseBlock(/*MustBeDeclaration=*/true);
-        } else {
+        if (Style.BraceWrapping.AfterExternBlock == true &&
+            Style.IndentExternBlock == true) {
MarcusJohnson91 wrote:
> MyDeveloperDay wrote:
> > something here looks abit odd? there is too much repetition around you 
> > option, I think you doing something at the wrong level.
> I agree that the parseBlock function is doing too much, but it's written that 
> way to begin with.
> The parseBlock function takes 3 parameters and has defaults for two of them, 
> I just changed the value for those defaults on the IndentExternBlock == false 
> versions to default to not indenting; that way the AfterExternBlock option 
> only handles bracewrapping extern blocks, without indenting as well.
I still feel this blocks of 4 if can be written better, its making my eyes 
hurt, every if calls parseBlock() with either true.true, of true,false 

I feel it could be something like

if (Style.BraceWrapping.AfterExternBlock){


cfe-commits mailing list

Reply via email to