[PATCH] D69746: [analyzer] FixItHint: Apply and test hints with the Clang Tidy's script
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 13 13:56:27 PST 2019
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
I like this!
@gribozavr: It looks like @Charusso has independently implemented what we've talked about before <https://reviews.llvm.org/D65182?id=215236#inline-601864>. Do you agree that the duplication is inevitable here, or should we try to re-use code?
================
Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:92
+
+ bool IncludePath = false, ShouldEmitAsError = false, FixitsAsRemarks = false,
+ ApplyFixIts = false;
----------------
I'll be perfectly happy with removing `FixitsAsRemarks` entirely. Your new mechanism is superior.
================
Comment at: clang/test/Analysis/check_analyzer_fixit.py:50-51
+ clang_dir = clang_dir.strip()
+ if sys.platform in ['win32']:
+ clang_dir = clang_dir.replace('\\', '/')
+
----------------
I think there must be an `os.path` function for this.
================
Comment at: clang/test/Analysis/check_analyzer_fixit.py:59
+ f.write(text)
+ f.truncate()
+
----------------
Mmm, what does this do?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69746/new/
https://reviews.llvm.org/D69746
More information about the cfe-commits
mailing list