[PATCH] D28330: [analyzer] Fix false positives in Keychain API checker
Devin Coughlin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 4 16:06:34 PST 2017
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
Looks good to me, aside from minor quibbles about capitalization and variable naming.
================
Comment at: lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp:502
+ bool Assumption) const {
+ AllocatedDataTy ASet = State->get<AllocatedData>();
+ if (ASet.isEmpty())
----------------
It seems a bit weird to call this a 'Set' -- it is a map, right?
================
Comment at: lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp:514
+ // Match for a restricted set of patterns for cmparison of error codes.
+ // Note, the comparisons of type '0 == st' are transformed into SymintExpr.
+ SymbolRef ReturnSymbol = nullptr;
----------------
Typo: 'SymintExpr' --> 'SymIntExpr'
================
Comment at: lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp:518
+ const llvm::APInt &RHS = SIE->getRHS();
+ bool errorIsReturned = (OpCode == BO_EQ && RHS != NoErr) ||
+ (OpCode == BO_NE && RHS == NoErr);
----------------
'errorIsReturned' should start with a capital letter.
https://reviews.llvm.org/D28330
More information about the cfe-commits
mailing list