aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-08-24 21:58:55 +0000
committerAnna Zaks <ganna@apple.com>2011-08-24 21:58:55 +0000
commit5eb7d82604970c2d2730a8b1fe5ee268b37f9844 (patch)
tree2a0ff0a139e0775beffc8474042c173f7475eca9 /lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
parentc266de97e269c3747ffc2d122fe53185b541cb37 (diff)
[analyzer] Do not use references in std::pair.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
index 161b8433d6..f89266f111 100644
--- a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
@@ -62,7 +62,7 @@ public:
void checkEndPath(EndOfFunctionNodeBuilder &B, ExprEngine &Eng) const;
private:
- typedef std::pair<SymbolRef, const AllocationState&> AllocationPair;
+ typedef std::pair<SymbolRef, const AllocationState*> AllocationPair;
typedef llvm::SmallVector<AllocationPair, 2> AllocationPairVec;
enum APIKind {
@@ -504,7 +504,7 @@ void MacOSKeychainAPIChecker::checkPreStmt(const ReturnStmt *S,
BugReport *MacOSKeychainAPIChecker::
generateAllocatedDataNotReleasedReport(const AllocationPair &AP,
ExplodedNode *N) const {
- const ADFunctionInfo &FI = FunctionsToTrack[AP.second.AllocatorIdx];
+ const ADFunctionInfo &FI = FunctionsToTrack[AP.second->AllocatorIdx];
initBugType();
llvm::SmallString<70> sbuf;
llvm::raw_svector_ostream os(sbuf);
@@ -537,7 +537,7 @@ void MacOSKeychainAPIChecker::checkDeadSymbols(SymbolReaper &SR,
if (State->getSymVal(I->first) ||
definitelyReturnedError(I->second.RetValue, State, C.getSValBuilder()))
continue;
- Errors.push_back(std::make_pair(I->first, I->second));
+ Errors.push_back(std::make_pair(I->first, &I->second));
}
if (!Changed)
return;
@@ -576,7 +576,7 @@ void MacOSKeychainAPIChecker::checkEndPath(EndOfFunctionNodeBuilder &B,
Eng.getSValBuilder())) {
continue;
}
- Errors.push_back(std::make_pair(I->first, I->second));
+ Errors.push_back(std::make_pair(I->first, &I->second));
}
// If no change, do not generate a new state.