summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-10-07 17:16:59 +0000
committerJordan Rose <jordan_rose@apple.com>2013-10-07 17:16:59 +0000
commit31b71f3097a338315a144067dde5b160c4e44fc9 (patch)
tree4bcfbd5089202bb744028ad96f7500904cfacc45 /lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
parent391165f4b6e90918dd8b97d6970617591821a8d8 (diff)
downloadclang-31b71f3097a338315a144067dde5b160c4e44fc9.tar.gz
clang-31b71f3097a338315a144067dde5b160c4e44fc9.tar.bz2
clang-31b71f3097a338315a144067dde5b160c4e44fc9.tar.xz
[analyzer] ArrayRef-ize BugReporter::EmitBasicReport.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp b/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
index 92c0eef3e8..d29a12a90e 100644
--- a/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
@@ -141,7 +141,6 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrncatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- SourceRange R = LenArg->getSourceRange();
PathDiagnosticLocation Loc =
PathDiagnosticLocation::createBegin(LenArg, BR.getSourceManager(), AC);
@@ -159,7 +158,7 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
os << "se a safer 'strlcat' API";
BR.EmitBasicReport(FD, "Anti-pattern in the argument", "C String API",
- os.str(), Loc, &R, 1);
+ os.str(), Loc, LenArg->getSourceRange());
}
}