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 | c29bed398971e550a4cacddf3dcf2b6b8a6e37b4 (patch) | |
tree | 24005460986f13145de014f4313f7c6be77477c0 /clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | |
parent | 61a003315e74d7e072e6702b0384921696d9f767 (diff) | |
download | bcm5719-llvm-c29bed398971e550a4cacddf3dcf2b6b8a6e37b4.tar.gz bcm5719-llvm-c29bed398971e550a4cacddf3dcf2b6b8a6e37b4.zip |
[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.)
llvm-svn: 140182
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp index 08f4fb1e822..983252c7710 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp +++ b/clang/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); } } |