diff options
author | Jakub Budiský <jakub.budisky@gmail.com> | 2021-02-26 09:05:35 +0100 |
---|---|---|
committer | Marek Kurdej <marek.kurdej@gmail.com> | 2021-02-26 09:17:07 +0100 |
commit | 2a42c759ae7bb09dd448d188138f310d014fcab6 (patch) | |
tree | 2fb172e2d3f869ebf9d379f633f8cafb9eae267f /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 0b05908feb0117dcfa18485a6c9df5229e32bd7a (diff) | |
download | llvm-2a42c759ae7bb09dd448d188138f310d014fcab6.zip llvm-2a42c759ae7bb09dd448d188138f310d014fcab6.tar.gz llvm-2a42c759ae7bb09dd448d188138f310d014fcab6.tar.bz2 |
[clang-format] [PR19056] Add support for access modifiers indentation
Adds support for coding styles that make a separate indentation level for access modifiers, such as Code::Blocks or QtCreator.
The new option, `IndentAccessModifiers`, if enabled, forces the content inside classes, structs and unions (“records”) to be indented twice while removing a level for access modifiers. The value of `AccessModifierOffset` is disregarded in this case, aiming towards an ease of use.
======
The PR (https://bugs.llvm.org/show_bug.cgi?id=19056) had an implementation attempt by @MyDeveloperDay already (https://reviews.llvm.org/D60225) but I've decided to start from scratch. They differ in functionality, chosen approaches, and even the option name. The code tries to re-use the existing functionality to achieve this behavior, limiting possibility of breaking something else.
Reviewed By: MyDeveloperDay, curdeius, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D94661
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions