[PATCH] [clang-tidy] Add an option to export suggested fixes into a file.

Alexander Kornienko alexfh at google.com
Thu Sep 4 02:57:47 PDT 2014


NIce! But please add error handling for YAML serialization and a bit more description of the new option.

================
Comment at: clang-tidy/ClangTidy.cpp:374
@@ +373,3 @@
+  yaml::Output YAML(OS);
+  YAML << TUR;
+}
----------------
"return YAML.error();" seems like a good idea in case the file is not writable or any other error occurs.

================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:82
@@ +81,3 @@
+static cl::opt<std::string>
+    ExportFixes("export-fixes", cl::desc("File to store suggested fixes in."),
+                cl::value_desc("filename"), cl::cat(ClangTidyCategory));
----------------
I'd say a few more words about why we need this and how can one use this file.

http://reviews.llvm.org/D5176






More information about the cfe-commits mailing list