summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2019-10-18 15:21:06 +0000
committerKrasimir Georgiev <krasimir@google.com>2019-10-18 15:21:06 +0000
commitfa738af8a2b2b47ce6be83f883c6ff814ece1f18 (patch)
tree4b2cefb0a2ac9b656c1d57cce53c36011c3855f5 /include
parent92bf0539a1e2abe2e328e15d2c9e685d696fd378 (diff)
downloadclang-fa738af8a2b2b47ce6be83f883c6ff814ece1f18.tar.gz
[clang-format] fix regression recognizing casts in Obj-C calls
Summary: r373922 added checks for a few tokens that, following an `)` make it unlikely that the `)` is the closing paren of a cast expression. The specific check for `tok::l_square` there introduced a regression for casts of Obj-C calls, like: ``` (cast)[func arg] ``` From the tests added in r373922, I believe the `tok::l_square` case is added to capture the case where a non-cast `)` is directly followed by an attribute specifier, like: ``` int f(int x) [[noreturn]]; ``` I've specialized the code to look for such attribute specifier instead of `tok::l_square` in general. Also, I added a regression test and moved the test cases added in r373922 to an already existing place documenting other instances of historically misidentified casts. Reviewers: MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69164 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions