This is an archive of the discontinued LLVM Phabricator instance.

[Analyzer] Iterator Checkers - Do an early return after handling calls
ClosedPublic

Authored by baloghadamsoftware on Apr 25 2019, 8:39 AM.

Details

Summary

This patch is more of a fix than a real improvement: in checkPostCall() we should return immediately after finding the right call and handling it. This both saves unnecessary processing and double-handling calls by mistake.

Diff Detail

Repository
rC Clang

Event Timeline

NoQ accepted this revision.Apr 25 2019, 1:43 PM

Thx, this is safer!

lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
566

CXXMethodDecl has a lot of fancy getters on it, such as isMoveAssignmentOperator().

This revision is now accepted and ready to land.Apr 25 2019, 1:43 PM
This revision was automatically updated to reflect the committed changes.