summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/ArrayBoundChecker.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2009-11-14 12:08:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2009-11-14 12:08:24 +0000
commitf4c511b026a8c9d11392c5ce05ff0a6de28d8172 (patch)
tree73f8290ea8de557db9c0c4f5f83c08128af18340 /clang/lib/Analysis/ArrayBoundChecker.cpp
parentea956ddf0b664de624b5ca046f5d9daf87ada727 (diff)
downloadbcm5719-llvm-f4c511b026a8c9d11392c5ce05ff0a6de28d8172.tar.gz
bcm5719-llvm-f4c511b026a8c9d11392c5ce05ff0a6de28d8172.zip
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. llvm-svn: 88779
Diffstat (limited to 'clang/lib/Analysis/ArrayBoundChecker.cpp')
-rw-r--r--clang/lib/Analysis/ArrayBoundChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/ArrayBoundChecker.cpp b/clang/lib/Analysis/ArrayBoundChecker.cpp
index 34a5631edd3..549a22bec17 100644
--- a/clang/lib/Analysis/ArrayBoundChecker.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud