This revision was automatically updated to reflect the committed changes.
Closed by commit rC352125: [clang-format] square parens with one token are not
Objective-C message sends (authored by arphaman, committed by ).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
arphaman updated this revision to Diff 183372.
arphaman marked 3 inline comments as done.
arphaman added a comment.
Update for Ben's comments.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56226/new/
https://reviews.llvm.org/D56226
Files:
benhamilton added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:501
+CurrentToken->Next->is(tok::equal))) ||
+ (CurrentToken->Previous->Previous == Left)) &&
Left->is(TT_ObjCMethodExpr)) {
I
arphaman updated this revision to Diff 180110.
arphaman added a comment.
Do not annotate one token `[ ]` expressions as Objective-C message sends
as suggested by Duncan.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56226/new/
https://reviews.llvm.org/D56226
Files:
jkorous added a comment.
I was thinking the same (that we might be able to make the detection more
precise) but I got the impression these cases are handled later (L524 and
below).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56226/new/
dexonsmith added a comment.
Note that a message send needs to have two expressions without an operator in
between. Can we also rule out all square brackets that just have a single
identifier or number token?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
jkorous added a comment.
Hi Alex, thanks for fixing this.
I assume chance of testing an Objective-C header with assignment to method
result without any other specifically Objective-C (detectable) construct is
significantly lower than chance of testing a C99 header with designated
arphaman created this revision.
arphaman added reviewers: benhamilton, krasimir, djasper.
Herald added subscribers: dexonsmith, jkorous.
The commit r322690 introduced support for ObjC detection in header files.
Unfortunately some C headers that use designated initializers are now
incorrectly