diff options
author | Anna Zaks <ganna@apple.com> | 2011-09-20 21:38:35 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-09-20 21:38:35 +0000 |
commit | 590dd8e0959d8df5621827768987c4792b74fc06 (patch) | |
tree | 6e7b7174dbee28f6a7fbc1b4273db489d21d99d0 /lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | |
parent | 77ce46d769b581b8a6ddb0d58231b8be9a8a6026 (diff) |
[analyzer] Refactor PathDiagnosticLocation: Make PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation.
(Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp index 08f4fb1e82..983252c771 100644 --- a/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp @@ -212,8 +212,10 @@ void MallocOverflowSecurityChecker::OutputPossibleOverflows( ++i) { SourceRange R = i->mulop->getSourceRange(); BR.EmitBasicReport("MallocOverflowSecurityChecker", - "the computation of the size of the memory allocation may overflow", - i->mulop->getOperatorLoc(), &R, 1); + "the computation of the size of the memory allocation may overflow", + PathDiagnosticLocation::createOperatorLoc(i->mulop, + BR.getSourceManager()), + &R, 1); } } |