clang formatting removes space after if statement

Sysprogs forums Forums VisualGDB clang formatting removes space after if statement

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20326
    zzattack
    Participant

    After switching to the clang engine I notice that my document formatting is slightly broken.

    Formatting now removes spaces after ‘if’ statements, so

    if (condition) { }

    is changed to

    if(condition) { }

    I find this fairly annoying and can’t find where to change this. The corresponding VS formatting setting is of course set to my liking; I have checked the option

    Spacing for control blocks
    * Insert space between keyword and opening parenthesis in control flow statements

    Perhaps of special interest is that this formatting does not apply to while or switch staments, only if’s seem affected.

    #20343
    support
    Keymaster

    Hi,

    Strange, we have double-checked this on a simple “Hello, world” program and VisualGDB actually followed the regular VS formatting setting. Perhaps something else is affecting this? Could you reproduce it in a minimal source file that doesn’t contain anything else? If not, could you please share the minimum repro case?

    #22026
    hvbill
    Participant

    I have the same issue when there is a comment on the line above. Both in live coding and when using ctrl k + f.

     // Comment
     if(test)
     {
       DoSomething();
     }

    I’m running VisualGDB 5.3R8

    • This reply was modified 6 years, 1 month ago by hvbill.
    • This reply was modified 6 years, 1 month ago by hvbill.
    #22029
    hvbill
    Participant

    Found that this has been fixed in VisualGDB 5.4.

    Great!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.