diff options
author | Daniel Sanders <daniel_l_sanders@apple.com> | 2019-01-18 18:40:35 +0000 |
---|---|---|
committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2019-01-18 18:40:35 +0000 |
commit | 1089e6e9e411710416632707d705858ef27d683c (patch) | |
tree | 66637ca71f2e6453c77d774540fa0a42ca530eb0 /lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py | |
parent | dc4e1547207fa31d80e423744b834291a69f6484 (diff) | |
download | bcm5719-llvm-1089e6e9e411710416632707d705858ef27d683c.tar.gz bcm5719-llvm-1089e6e9e411710416632707d705858ef27d683c.zip |
[adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t)
Summary:
nullptr can implicitly convert to Twine as Twine(nullptr) in which case it
resolves to Twine(const char *). This constructor derefs the pointer and
therefore doesn't work. Add a Twine(std::nullptr_t) = delete to make it a
compile time error.
It turns out that in-tree usage of Twine(nullptr) is confined to a single
private method in IRBuilder where foldConstant(... const Twine &Name = nullptr)
and this method is only ever called with an explicit Name argument as making it
a mandatory argument doesn't cause compile-time or run-time errors.
Reviewers: jyknight
Reviewed By: jyknight
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D56870
llvm-svn: 351572
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py')
0 files changed, 0 insertions, 0 deletions