[PATCH] D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 11:52:47 PDT 2020


krasimir added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2405
                             tok::kw___attribute, tok::kw___declspec,
-                            tok::kw_alignas) ||
+                            tok::kw_alignas, tok::l_square) ||
          ((Style.Language == FormatStyle::LK_Java ||
----------------
Just to make sure I follow -- at this point why can't we check for the more specific `TT_AttributeSquare` instead of the general `tok::l_square` (if that's available, not sure when it gets computed) (`isOneOf` accepts both `tok::`'s and `TT_`'s). 

Ditto for the new `tok::l_square` below.


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

https://reviews.llvm.org/D79354





More information about the cfe-commits mailing list