djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land.
Looks good. ================ Comment at: lib/Format/Format.cpp:1557 @@ +1556,3 @@ + const std::set<llvm::StringRef> HeadersToDelete) { + if (HeadersToDelete.find(HeaderName) != HeadersToDelete.end()) + return true; ---------------- return HeaderToDelete.find(HeaderName) != HeadersToDelete.end() || HeaderToDelete.find(HeaderName.trim("\"<>")) != HeadersToDelete.end() ================ Comment at: lib/Format/Format.cpp:1623 @@ -1607,2 +1622,3 @@ if (IncludeRegex.match(Line, &Matches)) { + // The header name with quptos or angle brackets. StringRef IncludeName = Matches[2]; ---------------- quotes. ================ Comment at: lib/Format/Format.cpp:1634 @@ +1633,3 @@ + // sure we don't delete across the file boundary. + unsigned Length = (Offset + Line.size() < Code.size()) ? Line.size() + 1 + : Line.size(); ---------------- Maybe: unsigned Length = std::min(Line.size(), Code.size() - Offset - 1); https://reviews.llvm.org/D24829 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits