djasper added inline comments. ================ Comment at: unittests/Format/CleanupTest.cpp:310 @@ +309,3 @@ + Context.createInMemoryFile("fix.cpp", Code); + tooling::Replacements Replaces = { + tooling::Replacement("fix.cpp", UINT_MAX, 0, "#include \"b.h\"")}; ---------------- Well, the only reason you seem to be using the FileID or "Context" for that matter is to translate between line/col and offset. I'd just pull that functionality out into a separate function (which does it based on the "Code" input) or not at all (hard-coding the offset doesn't seem *that* bad).
================ Comment at: unittests/Format/CleanupTest.cpp:510 @@ +509,3 @@ +TEST_F(CleanUpReplacementsTest, InsertMultipleNewHeadersAndSortGoogle) { + std::string Code = "\nint x;"; + std::string Expected = "#include \"fix.h\"\n" ---------------- Have you seen this comment? http://reviews.llvm.org/D20734 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits