[PATCH] D29419: [Analyzer] Checker for mismatched iterators
Aditya Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 20 10:36:31 PST 2017
hiraditya added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/MismatchedIteratorChecker.cpp:375
+ "MismatchedIterator");
+ auto *N = C.generateNonFatalErrorNode(State, &Tag);
+ if (!N) {
----------------
This can be rewritten as:
```
if (auto *N = C.generateNonFatalErrorNode(State, &Tag))
reportMismatchedBug("Iterator access mismatched.", Iter1, C, N);
```
https://reviews.llvm.org/D29419
More information about the cfe-commits
mailing list