[llvm-bugs] [Bug 36020] New: Add option to IndentPPDirectives to respect indentation of context
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 19 09:46:29 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36020
Bug ID: 36020
Summary: Add option to IndentPPDirectives to respect
indentation of context
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: aardappel at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
With IndentPPDirectives: AfterHash, preprocessor directives are indented, but
only relative to other preprocessor directives, not to the surrounding code. So
code that is intended to look like:
> void foo() {
> if (bar) {
> A;
> # ifdef D
> # define E
> B;
> # endif
> C;
> }
> }
is clang-formatted to:
> void foo() {
> if (bar) {
> A;
> #ifdef D
> # define E
> B;
> #endif
> C;
> }
> }
This is a follow-up from bug https://bugs.llvm.org/show_bug.cgi?id=17362
Related feature: https://bugs.llvm.org/show_bug.cgi?id=36019
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180119/c5291776/attachment.html>
More information about the llvm-bugs
mailing list