summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLoopInfo.cpp
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
commiteff2a2ab2b51070133c39336c91b3f8d1c31e0c4 (patch)
tree0c580695486851f8e1abc9935cd7c0696c9714c1 /llvm/lib/CodeGen/MachineLoopInfo.cpp
parent7e5d5ee873e14b7e3db0ee07fa402aca13f83a36 (diff)
downloadbcm5719-llvm-eff2a2ab2b51070133c39336c91b3f8d1c31e0c4.tar.gz
bcm5719-llvm-eff2a2ab2b51070133c39336c91b3f8d1c31e0c4.zip
[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 llvm-svn: 375247
Diffstat (limited to 'llvm/lib/CodeGen/MachineLoopInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud