This revision was automatically updated to reflect the committed changes.
Closed by commit rL279056: [analyzer] Teach CloneDetector to find clones that
look like copy-paste errors. (authored by dergachev).
Changed prior to commit:
https://reviews.llvm.org/D23314?vs=68422=68518#toc
Repository:
v.g.vassilev accepted this revision.
v.g.vassilev added a comment.
This revision is now accepted and ready to land.
LGTM.
https://reviews.llvm.org/D23314
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
teemperor updated this revision to Diff 68422.
teemperor marked 11 inline comments as done.
teemperor added a comment.
- Made warning messages more 'clangish' as pointed out by Vassil (Thanks!)
- Improved the class/variable names as pointed out by Artem (Thanks a lot!)
- CloneChecker's functions
teemperor added inline comments.
Comment at: test/Analysis/copypaste/suspicious-clones.cpp:11
@@ +10,3 @@
+return a;
+ return b; // expected-note{{Suggestion is based on the useage of this
variable in a similar piece of code.}}
+}
v.g.vassilev wrote:
> This
NoQ added a comment.
I couldn't find any real problems - the code's getting mature! Please accept a
few very important "please rename this variable" comments :)
Comment at: include/clang/Analysis/CloneDetection.h:236
@@ +235,3 @@
+///clone in this pair.
+struct
v.g.vassilev requested changes to this revision.
This revision now requires changes to proceed.
Comment at: lib/StaticAnalyzer/Checkers/CloneChecker.cpp:83
@@ +82,3 @@
+auto WarnID = DiagEngine.getCustomDiagID(
+DiagnosticsEngine::Warning, "Maybe you wanted to use %0
teemperor created this revision.
teemperor added reviewers: v.g.vassilev, NoQ, zaks.anna.
teemperor added subscribers: cfe-commits, vsk.
One of the goals of the project was to find bugs caused by copy-pasting, which
happen when a piece of code is copied but not all variables in this piece of