Issue 180593
Summary [clang-format] Support indentation of preprocessor directives to level of surrounding code
Labels clang-format
Assignees
Reporter nabelekt
    Please support indentation of preprocessor directives to level of surrounding code.

I want
```cpp
int main()
{

#warning This is a test!

 while (true)
    {
        DoThingOne();

#ifdef MACRO_A
 DoThingThree();
#endif
    }

    return 0;
}

```
to to be formatted as
```cpp
int main()
{

    #warning This is a test!

    while (true)
    {
        DoThingOne();

        #ifdef MACRO_A
 DoThingThree();
        #endif
    }

    return 0;
}
```

Related: https://www.reddit.com/r/cpp_questions/comments/102vlmu/indent_macros_with_clang_format/
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to