[llvm-bugs] [Bug 37975] New: [Formatter/ObjC] Incorrect indentation after indented @optional when doing incremental formatting
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 28 06:57:28 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37975
Bug ID: 37975
Summary: [Formatter/ObjC] Incorrect indentation after indented
@optional when doing incremental formatting
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: jolesiak at google.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Scenario:
1. Let's assume we have a.m file:
@protocol A
@optional
// comment
- (void)f;
@end
MACRO
2. The comment was changed.
3. We try to do incremental formatting ("clang-format -lines=3:3 a.m")
4. Result:
@protocol A
@optional
// comment
- (void)f;
@end
MACRO
Result of running clang-format on the whole file ("clang-format a.m") is
correct:
@protocol A
@optional
// comment
- (void)f;
@end
MACRO
--
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/20180628/af22df9d/attachment.html>
More information about the llvm-bugs
mailing list