mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-05 18:17:00 +00:00
Fix use-after-free bug caught by address sanitizer:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/2959 The location string is returned as a std::string, not a StringRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb0c9094ac
commit
bb7b423bdc
@ -267,7 +267,7 @@ public:
|
||||
/// Return a string with the location information for this diagnostic
|
||||
/// in the format "file:line:col". If location information is not available,
|
||||
/// it returns "<unknown>:0:0".
|
||||
const StringRef getLocationStr() const;
|
||||
const std::string getLocationStr() const;
|
||||
|
||||
/// Return location information for this diagnostic in three parts:
|
||||
/// the source file name, line number and column.
|
||||
|
@ -80,7 +80,7 @@ void DiagnosticInfoOptimizationRemark::getLocation(StringRef *Filename,
|
||||
*Column = DIL.getColumnNumber();
|
||||
}
|
||||
|
||||
const StringRef DiagnosticInfoOptimizationRemark::getLocationStr() const {
|
||||
const std::string DiagnosticInfoOptimizationRemark::getLocationStr() const {
|
||||
StringRef Filename("<unknown>");
|
||||
unsigned Line = 0;
|
||||
unsigned Column = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user