alexfh added a comment. I'm not sure `tooling::Replacement` is the best place to store check name. Maybe create a separate wrapper class and serialize it instead (clang-apply-replacements will have to be changed to support this format as well). This could be `ClangTidyDiagnostic` or just `Diagnostic`, and we could also store the message and other useful information in it.
================ Comment at: tools/clang/include/clang/Tooling/Core/Replacement.h:93 @@ +92,3 @@ + const LangOptions &LangOpts = LangOptions(), + StringRef CheckName = "" + ); ---------------- Please clang-format the code. ================ Comment at: tools/clang/tools/extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:80 @@ -79,3 +79,3 @@ - Error.Fix.insert(tooling::Replacement(SM, Range, FixIt.CodeToInsert)); + Error.Fix.insert(tooling::Replacement(SM, Range, FixIt.CodeToInsert, LangOptions(), StringRef(Error.CheckName))); } ---------------- Doesn't it compile without `StringRef()` around `Error.CheckName`? http://reviews.llvm.org/D16183 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits