]> granicus.if.org Git - clang/commit
[clang-format] Do not treat asm clobber [ as ObjCExpr, refined
authorKrasimir Georgiev <krasimir@google.com>
Thu, 22 Nov 2018 14:49:55 +0000 (14:49 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Thu, 22 Nov 2018 14:49:55 +0000 (14:49 +0000)
commit33b30eb6d622918dcdc0425730a712f0460db522
tree8eaa0bdc09ea1e2848cfaaceb3b31f9911614be6
parent0718def197e34c47a44c48592e9ea7b5d210b239
[clang-format] Do not treat asm clobber [ as ObjCExpr, refined

Summary:
r346756 refined clang-format to not treat the `[` in `asm (...: [] ..)` as an
ObjCExpr. However that's not enough, as we might have a comma-separated list of
such clobbers as in the newly added test.
This updates the detection to instead look at the Line's first token being `asm`
and not mark `[`-s as ObjCExprs in this case.

Reviewers: djasper, benhamilton

Reviewed By: djasper, benhamilton

Subscribers: benhamilton, cfe-commits

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

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