[PATCH] D65648: [clang-format] Add support to SpacesBeforeTrailingComments to add spaces before Block comments.
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 02:56:59 PDT 2019
MyDeveloperDay requested changes to this revision.
MyDeveloperDay added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Format/TokenAnnotator.cpp:2163
+ if (Current->is(TT_BlockComment)){
+ std::cout << "TYPE"<<Line.Type<<"\n";
+ if ((Line.Type != LT_PreprocessorDirective)){
----------------
remove
================
Comment at: lib/Format/TokenAnnotator.cpp:2165
+ if ((Line.Type != LT_PreprocessorDirective)){
+ if (!Current->Previous->isOneOf(TT_TemplateCloser,tok::l_paren) && Current->isTrailingComment()){
+ Current->SpacesRequiredBefore = Style.SpacesBeforeTrailingComments;
----------------
would a test that shows why it should not be used after TT_TemplateCloser or tok::l_paren help?
================
Comment at: unittests/Format/FormatTest.cpp:3663
+ FormatStyle Style = getGoogleStyle();
+ Style.SpacesBeforeTrailingComments = 0;
EXPECT_EQ("#define MACRO() \\\n"
----------------
this feels odd, suggesting those using google style will get reformatted changes?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65648/new/
https://reviews.llvm.org/D65648
More information about the cfe-commits
mailing list