> 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/ _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
