clang-format

Indenting preprocessor directives with clang-format

﹥>﹥吖頭↗ 提交于 2020-11-30 17:30:46
问题 I am working on a c++ project where I am using a lot of #pragma omp . I use the wonderful clang-format for tidiness but it always deletes the indentation for all preprocessor directives. Is there a way to change that behavior? Or is there another formatting tool that is more recommendable? Or should I avoid using these tools at all? 回答1: You might want to just patch it yourself and make a pull request. It's not that hard, I made a similarly mundane pull request once. The clang-format code is

Indenting preprocessor directives with clang-format

筅森魡賤 提交于 2020-11-30 17:29:01
问题 I am working on a c++ project where I am using a lot of #pragma omp . I use the wonderful clang-format for tidiness but it always deletes the indentation for all preprocessor directives. Is there a way to change that behavior? Or is there another formatting tool that is more recommendable? Or should I avoid using these tools at all? 回答1: You might want to just patch it yourself and make a pull request. It's not that hard, I made a similarly mundane pull request once. The clang-format code is

Indenting preprocessor directives with clang-format

半世苍凉 提交于 2020-11-30 17:28:56
问题 I am working on a c++ project where I am using a lot of #pragma omp . I use the wonderful clang-format for tidiness but it always deletes the indentation for all preprocessor directives. Is there a way to change that behavior? Or is there another formatting tool that is more recommendable? Or should I avoid using these tools at all? 回答1: You might want to just patch it yourself and make a pull request. It's not that hard, I made a similarly mundane pull request once. The clang-format code is