diff options
author | Anna Zaks <ganna@apple.com> | 2011-09-15 01:08:34 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-09-15 01:08:34 +0000 |
commit | 220ac8c175cb1bf9b18d82eefe036995d7a2164d (patch) | |
tree | 5e2b69c8cd558e2011ee06f02ad0f29b006baaa6 /lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp | |
parent | f60dca355d3e754b7a51726c7455d1e7583a65ba (diff) |
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?):
- Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext.
- Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp index c2b547612c..2607db80ba 100644 --- a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp @@ -622,7 +622,8 @@ PathDiagnosticPiece *MacOSKeychainAPIChecker::SecKeychainBugVisitor::VisitNode( unsigned Idx = getTrackedFunctionIndex(funName, true); assert(Idx != InvalidIdx && "This should be a call to an allocator."); const Expr *ArgExpr = CE->getArg(FunctionsToTrack[Idx].Param); - PathDiagnosticLocation Pos(ArgExpr, BRC.getSourceManager()); + PathDiagnosticLocation Pos(ArgExpr, BRC.getSourceManager(), + N->getLocationContext()); return new PathDiagnosticEventPiece(Pos, "Data is allocated here."); } |