[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 8 09:10:14 PST 2016


zaks.anna added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:721
+
+static bool inTopLevelNamespace(const Decl *D, IdentifierInfo *II) {
+  const auto *ND = dyn_cast<NamespaceDecl>(D->getDeclContext());
----------------
zaks.anna wrote:
> Would isInStdNamespace() from BugReporterVisitor.cpp be useful here? It would be fine to add this API to the CheckerContext or some other place accessible from here and the BugReporter.
Is there a reason not to use isInStdNamespace() instead of the inTopLevelNamespace()? We can add the API to Checker Context.


https://reviews.llvm.org/D25660





More information about the cfe-commits mailing list