[PATCH] D32825: [clang-format] Improve understanding of combined typedef+record declarations

Jacob Bandes-Storch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 01:15:30 PDT 2017

jtbandes marked an inline comment as done.
jtbandes added inline comments.

Comment at: lib/Format/UnwrappedLineFormatter.cpp:368
       // We don't merge short records.
-      if (Line.First->isOneOf(tok::kw_class, tok::kw_union, tok::kw_struct,
-                              Keywords.kw_interface))
+      FormatToken *T =
+          Line.First->is(tok::kw_typedef) ? Line.First->Next : Line.First;
djasper wrote:
> Don't use "T", that's too much engrained as template parameter. Use "Tok".
Added nested scope to avoid shadowing `Tok` from above.


More information about the cfe-commits mailing list