Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clang-format file #1592

Closed
2 tasks
nmm0 opened this issue Nov 2, 2021 · 1 comment · Fixed by #1614
Closed
2 tasks

Update clang-format file #1592

nmm0 opened this issue Nov 2, 2021 · 1 comment · Fixed by #1614

Comments

@nmm0
Copy link
Collaborator

nmm0 commented Nov 2, 2021

What Needs to be Done?

  • Fix clang-format identing of preprocessor directives
  • Make clang-format negatively indent access specifiers
@jstrzebonski
Copy link
Contributor

jstrzebonski commented Nov 10, 2021

@nmm0

Nic, for access modifiers AccessModifierOffset needs to be changed to -2.

About the preprocessor directives indention, what style is correct? Take a look at paragraph IndentPPDirectives here: https://clang.llvm.org/docs/ClangFormatStyleOptions.html, basically:

None:

#if FOO
#if BAR
#include <foo>
#endif
#endif

AfterHash:

#if FOO
#  if BAR
#    include <foo>
#  endif
#endif

BeforeHash:

#if FOO
  #if BAR
    #include <foo>
  #endif
#endif

Currently we have BeforeHash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants