[PATCH] D79990: [clang-format] [PR45614] Incorrectly indents [[nodiscard]] attribute funtions after a macro without semicolon

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 15 06:28:07 PDT 2020


krasimir added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:906
 // trailing semicolons from other constructs split to several lines.
-static bool tokenCanStartNewLine(const clang::Token &Tok) {
+static bool tokenCanStartNewLine(const FormatToken *Tok) {
   // Semicolon can be a null-statement, l_square can be a start of a macro or
----------------
nit: pass `Tok` by const reference (makes sure we don't have to deal with nullptr and as bonus will make this patch diff smaller).


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

https://reviews.llvm.org/D79990





More information about the cfe-commits mailing list