D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format introduce an ObjC regression
Only parse the [] if what follows is really an attribute
Differential D80547
[clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses MyDeveloperDay on May 26 2020, 4:11 AM. Authored by
Details D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format introduce an ObjC regression Only parse the [] if what follows is really an attribute
Diff Detail
Event Timeline
Comment Actions Handle more complex nested ObjC calls Comment Actions I'm not an ObjC expert, but I am pretty sure you can do something like: [[foo bar] baz: i[0]]; and [[foo bar] baz: i[0]][1];
Comment Actions This is nice! Thank you! Ran this through a mix of C++ and Objective-C sources and didn't spot any regressions from pre-D80144. |
From the peanut gallery, would checking TT_AttributeSquare here work (that should handle ambiguities around ObjC method calls)?