[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters
Whisperity via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 5 03:13:22 PDT 2018
whisperity added inline comments.
================
Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:317
+def MismatchedIteratorChecker : Checker<"MismatchedIterator">,
+ HelpText<"Check for use of iterators of different containers where iterators of the same container are expected">,
----------------
Is there any particular order entries of this file should be in? Seems to be broken now, but I guess when this patch comes up to the top of the stack it shall be fixed at a rebase.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:426
+ // For every template parameter which is an iterator type in the
+ // instantiation look for all functions parameters type by it and
+ // check whether they belong to the same container
----------------
functions' parameters' ?
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:934
+ }
+ reportMismatchedBug("Iterator access mismatched.", Iter1, Iter2, C, N);
+ }
----------------
If this string is the message that gets printed to the user, I think it must be rephrased a bit. If this message came across me, I'd be puzzled at first to understand what it is trying to mean.
https://reviews.llvm.org/D32845
More information about the cfe-commits
mailing list