diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-11-14 12:08:24 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-11-14 12:08:24 +0000 |
commit | d02e232c43b979758810794de24d3f5cde40fe93 (patch) | |
tree | 32a20b050ba1a7c26828bde07df0f8d8bd7355eb /lib/Analysis/ArrayBoundChecker.cpp | |
parent | 4fdba99ccce46d577ea1bcd5081843ef95ff5c11 (diff) |
Change *BugReport constructors to take StringRefs.
- Eliminates many calls to std::string.c_str()
- Fixes an invalid read in ReturnStackAddressChecker due to an unsafe call to
StringRef.data() which doesn't guarantee null-termination.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ArrayBoundChecker.cpp')
-rw-r--r-- | lib/Analysis/ArrayBoundChecker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ArrayBoundChecker.cpp b/lib/Analysis/ArrayBoundChecker.cpp index 34a5631edd..549a22bec1 100644 --- a/lib/Analysis/ArrayBoundChecker.cpp +++ b/lib/Analysis/ArrayBoundChecker.cpp @@ -77,7 +77,7 @@ void ArrayBoundChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l){ // Generate a report for this bug. RangedBugReport *report = - new RangedBugReport(*BT, BT->getDescription().c_str(), N); + new RangedBugReport(*BT, BT->getDescription(), N); report->addRange(S->getSourceRange()); |