[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 3 02:15:28 PDT 2018


baloghadamsoftware marked 3 inline comments as done.
baloghadamsoftware 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">,
----------------
whisperity wrote:
> 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.
Alphabetical order. Now it seems to be OK.


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:382
     }
+  } else if (!isa<CXXConstructorCall>(&Call)) {
+    // The main purpose of iterators is to abstract away from different
----------------
baloghadamsoftware wrote:
> a.sidorin wrote:
> > The function becomes > 100 lines long. Should we refactor this check into a separate function to improve readability?
> Yes, I think so this would be a good idea. Should I do it now?
I propose to refactor it later in a separate patch.


https://reviews.llvm.org/D32845





More information about the cfe-commits mailing list