goldstein.w.n added a comment.

In D137181#3904383 <https://reviews.llvm.org/D137181#3904383>, @owenpan wrote:

> With `ColumnLimit: 16` and `IndentPPDirectives: BeforeHash`, the format 
> should be:
>
>   #ifdef foo
>    #define bar() \
>        if (A) {  \
>            B();  \
>        }         \
>        C();
>   #endif
>
> With `IndentPPDirectives: AfterHash`, it should look like:
>
>   #ifdef foo
>   # define bar() \
>        if (A) {  \
>            B();  \
>        }         \
>        C();
>   #endif

Doesn't that add an arbitrary +1 to the begining of the indentation?
Shouldn't it be:

  // IndentPPDirectives: AfterHash
  #ifdef foo
  # define bar() \\
    if (A) {     \\
        B();     \\
    }            \\
    C();
  #endif
  
  // IndentPPDirectives: BeforeHash
  #ifdef foo
   #define bar() \\
    if (A) {     \\
        B();     \\
    }            \\
    C();
  #endif
  
  // IndentPPDirectives: NoneHash
  #ifdef foo
  #define bar() \\
   if (A) {     \\
       B();     \\
   }            \\
   C();
  #endif


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137181/new/

https://reviews.llvm.org/D137181

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to