summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-20 21:38:35 +0000
committerAnna Zaks <ganna@apple.com>2011-09-20 21:38:35 +0000
commitc29bed398971e550a4cacddf3dcf2b6b8a6e37b4 (patch)
tree24005460986f13145de014f4313f7c6be77477c0 /clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
parent61a003315e74d7e072e6702b0384921696d9f767 (diff)
downloadbcm5719-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.cpp6
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);
}
}
OpenPOWER on IntegriCloud