[PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 11:22:51 PDT 2016
v.g.vassilev added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/CloneChecker.cpp:102
@@ -95,5 +101,3 @@
// as a note.
- DiagEngine.Report(Group.Sequences.front().getStartLoc(), WarnID);
- for (unsigned i = 1; i < Group.Sequences.size(); ++i) {
- DiagEngine.Report(Group.Sequences[i].getStartLoc(), NoteID);
- }
+ static const char *const MsgSingular = "Clone of this code was detected";
+ static const char *const MsgPlural = "Clones of this code were detected";
----------------
I was thinking whether we shouldn't say `code snippet` or something that qualifies code, as it is too generic term.
================
Comment at: lib/StaticAnalyzer/Checkers/CloneChecker.cpp:112
@@ +111,3 @@
+ R->addNote("Code clone here",
+ makeLocation(Group.Sequences[i], Mgr),
+ Group.Sequences[i].getSourceRange());
----------------
Is that missing an indent?
https://reviews.llvm.org/D24916
More information about the cfe-commits
mailing list