[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-24 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-24 Thread Alex Lorenz via Phabricator via cfe-commits
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:

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-07 Thread Ben Hamilton via Phabricator via cfe-commits
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

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Alex Lorenz via Phabricator via cfe-commits
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:

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Jan Korous via Phabricator via cfe-commits
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/

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
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

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Jan Korous via Phabricator via cfe-commits
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

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-02 Thread Alex Lorenz via Phabricator via cfe-commits
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