[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 14:42:30 PDT 2022


MyDeveloperDay added a comment.

In D121451#3402167 <https://reviews.llvm.org/D121451#3402167>, @curdeius wrote:

> In D121451#3401947 <https://reviews.llvm.org/D121451#3401947>, @MyDeveloperDay wrote:
>
>> I'm a little uncomfortable with
>>
>>   //#<preprocessor directive>
>>
>> becoming
>>
>>   // #<preprocessor directive>
>>
>> At least without an option for it to not make changes
>
> Don't you think that `//#PPdirective` should be indented the same way as other code?
> E.g. in:
>
>   #include <header.h>
>   
>   int something;
>
> You comment the whole block and it becomes (with this patch):
>
>   // #include <header.h>
>   //
>   // int something;
>
> whereas it was:
>
>   //#include <header.h>
>   //
>   // int something;
>
> which seems inconsistent at least.

That makes sense..


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121451



More information about the cfe-commits mailing list