]> granicus.if.org Git - clang/commit
[clang-format] square parens with one token are not Objective-C message sends
authorAlex Lorenz <arphaman@gmail.com>
Thu, 24 Jan 2019 23:07:58 +0000 (23:07 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Thu, 24 Jan 2019 23:07:58 +0000 (23:07 +0000)
commite217acab66a45cb61e1e22b7dc3d1470fb18e62c
treef6dafa8a4f9255c22ec336fe3179472b7ace0047
parent4828e1069337a167df24e0ca2c30c9492ccf222a
[clang-format] square parens with one token are not Objective-C message sends

The commit r322690 introduced support for ObjC detection in header files.
Unfortunately some C headers that use designated initializers are now
incorrectly detected as Objective-C.
This commit fixes it by ensuring that `[ token ]` is not annotated as an
Objective-C message send.

rdar://45504376

Differential Revision: https://reviews.llvm.org/D56226

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352125 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp