[PATCH] D65182: [analyzer] Add fix-it hint support.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 15:22:10 PDT 2019
NoQ updated this revision to Diff 214462.
NoQ retitled this revision from "[analyzer] WIP: Add fix-it hint support." to "[analyzer] Add fix-it hint support.".
NoQ added a comment.
- Hide all current fixits behind a checker option, have them off by default. They're not tested enough yet.
- Suppress the dead stores fixit when the initializer has a side effect.
- Implement fixits-as-remarks for testing purposes. This is better than nothing, but i'd rather have something similar to clang-tidy where the test applies fixits and tests the resulting code.
- Add documentation for `BugReport::addFixItHint()`.
I plan to commit this in the current shape, hence no longer "WIP".
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65182/new/
https://reviews.llvm.org/D65182
Files:
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
clang/lib/StaticAnalyzer/Core/BugReporter.cpp
clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
clang/test/Analysis/analyzer-config.c
clang/test/Analysis/dead-stores.c
clang/test/Analysis/edges-new.mm
clang/test/Analysis/objc-arc.m
clang/test/Analysis/plist-output.m
clang/test/Analysis/virtualcall-fixits.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65182.214462.patch
Type: text/x-patch
Size: 29119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190809/8235326d/attachment-0001.bin>
More information about the cfe-commits
mailing list