summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
diff options
context:
space:
mode:
authorMatthias Gehre <M.Gehre@gmx.de>2019-08-19 21:39:16 +0000
committerMatthias Gehre <M.Gehre@gmx.de>2019-08-19 21:39:16 +0000
commit8b0d15e43f339371204961566aa7ba5f64c209c5 (patch)
treeeae9c2e9335646c60d61ae386c6851a1ce51d23c /lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
parentde7674ce76e06971e46e7ba7bef55fb3394e5102 (diff)
downloadbcm5719-llvm-8b0d15e43f339371204961566aa7ba5f64c209c5.tar.gz
bcm5719-llvm-8b0d15e43f339371204961566aa7ba5f64c209c5.zip
Fix use-after-free
Summary: The warning ``` lldb/source/Core/FormatEntity.cpp:2350:25: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling] ``` is emitted after annotating `llvm::StringRef` with `[[gsl::Pointer]]`. The reason is that in ``` size_t FormatEntity::AutoComplete(CompletionRequest &request) { llvm::StringRef str = request.GetCursorArgumentPrefix().str(); ``` the function `GetCursorArgumentPrefix()` returns a `StringRef`, and `StringRef::str()` returns a temporary `std::string`. Reviewers: jingham, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66442 llvm-svn: 369304
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud