]> granicus.if.org Git - clang/commit
clang-format: distinguish ObjC call subexpressions after r355434
authorKrasimir Georgiev <krasimir@google.com>
Mon, 11 Mar 2019 16:02:52 +0000 (16:02 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Mon, 11 Mar 2019 16:02:52 +0000 (16:02 +0000)
commitcf1bcf5fdc1669bc01f35dba7fe793c6bb60588b
treeed6bb004b49af5d1766533025239402cbac2382d
parent384f4d7cb5aec88bee11011400754f7cea334819
clang-format: distinguish ObjC call subexpressions after r355434

Summary:
The revision r355434 had the unfortunate side-effect that it started to
recognize certain ObjC expressions with a call subexpression followed by a
`a->b` subexpression as C++ lambda expressions.

This patch adds a bit of logic to handle these cases and documents them in
tests.

The commented-out test cases in the new test suite are ones that were
problematic before r355434.

Reviewers: MyDeveloperDay, gribozavr

Reviewed By: MyDeveloperDay, gribozavr

Subscribers: MyDeveloperDay, cfe-commits

Tags: #clang

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

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