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

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 22:36:46 PDT 2017

djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.

One nit, otherwise looks good.

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;
Don't use "T", that's too much engrained as template parameter. Use "Tok".


More information about the cfe-commits mailing list