[PATCH] clang-format: Fix space in for-each macro definition
strager
strager.nds at gmail.com
Mon Jun 8 19:02:39 PDT 2015
> Please use unittests/Format/FormatTest.cpp for the unit test.
Okay. (Should the other tests be ported too? Is there something special about the tests currently in test/Format?)
================
Comment at: lib/Format/Format.cpp:1125-1127
@@ -1124,4 +1124,5 @@
- if (std::find(ForEachMacros.begin(), ForEachMacros.end(),
- FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end())
- FormatTok->Type = TT_ForEachMacro;
+ if (!(Tokens.size() > 0 && Tokens.back()->Tok.getIdentifierInfo() &&
+ Tokens.back()->Tok.getIdentifierInfo()->getPPKeywordID() ==
+ tok::pp_define))
+ if (std::find(ForEachMacros.begin(), ForEachMacros.end(),
----------------
djasper wrote:
> Generally use clang-format. Also, why are you using two nested if conditions instead of just merging this into the other one?
I'll merge them.
http://reviews.llvm.org/D10266
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list