[PATCH] D24572: [clang-tidy] Clean up code after applying replacements.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 15 05:23:46 PDT 2016
hokein added inline comments.
================
Comment at: clang-tidy/ClangTidy.cpp:206
@@ +205,3 @@
+ StringRef Code = Buffer.get()->getBuffer();
+ format::FormatStyle Style = format::getLLVMStyle();
+ llvm::Expected<Replacements> CleanReplacements =
----------------
ioeric wrote:
> Add a `FIXME` here.
>
> And I think this might be a better workaround for now:
> format::FormatStyle InsertStyle = format::getStyle("file", File, "LLVM");
A further thought: we might not want to hard-code the code-style here. Add a FIXME to make the style customizable?
================
Comment at: clang-tidy/ClangTidy.cpp:218
@@ -169,1 +217,3 @@
+ }
+ Rewrite.overwriteChangedFiles();
llvm::errs() << "clang-tidy applied " << AppliedFixes << " of "
----------------
Shouldn't we check whether the overwrite operation is successful or not?
https://reviews.llvm.org/D24572
More information about the cfe-commits
mailing list