[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 07:34:10 PDT 2020


MyDeveloperDay updated this revision to Diff 266204.
MyDeveloperDay added a comment.

Handle more complex nested ObjC calls
Rename function to tryParseSimpleAttributes (not supporting full capability as yet)
Use RAII object to reset the TokenPosition
utilize the fact that Objective calls shouldn't end with "]]" I think... this should allow Attributes at least of the form `[[identifier::identifier]]`
I feel if this isn't a good enough perhaps we also check for the `;` after the second `]`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80547/new/

https://reviews.llvm.org/D80547

Files:
  clang/lib/Format/UnwrappedLineParser.cpp
  clang/lib/Format/UnwrappedLineParser.h
  clang/unittests/Format/FormatTest.cpp
  clang/unittests/Format/FormatTestObjC.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80547.266204.patch
Type: text/x-patch
Size: 4156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200526/9adb9a33/attachment-0001.bin>


More information about the cfe-commits mailing list