https://bugs.llvm.org/show_bug.cgi?id=36468
Bug ID: 36468
Summary: [Formatter/ObjC] Add // clang-format Language=XXX
support
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: bhamilto...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
The heuristic to guess ObjC vs C++ is pretty good now, but there will always be
cases where it fails, e.g.
===
#import "SomeOtherHeader.h"
int DoStuff(SomeOtherType *type);
===
where we cannot tell from the lexer if this is C++ or ObjC.
To fix this, we should add support for a special comment, similar to the
existing "clang-format off" comment.
Something like this:
===
#import "SomeOtherHeader.h"
// clang-format Language=ObjC
int DoStuff(SomeOtherType *type);
===
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs