[llvm-bugs] [Bug 35033] New: clang-format reformats already formatted code (comment before preprocessor directive)
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 23 06:04:15 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=35033
Bug ID: 35033
Summary: clang-format reformats already formatted code (comment
before preprocessor directive)
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: curdeius at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Tested on clang-format trunk r316311 from 2017-10-23.
The following code:
```
{
// clang-format off
#define M 5
}
```
gets formmatted to:
```
{
// clang-format off
#define M 5
}
```
Reformatting again leads to the original code again... and it cycles.
Apparently, it has to do with comments before preprocessor directives and seems
to be related to bug #31911 (https://bugs.llvm.org/show_bug.cgi?id=31911).
--
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/20171023/748ba4e7/attachment-0001.html>
More information about the llvm-bugs
mailing list