OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6b3c30
)
=delete the StringRef(nullptr_t) constructor.
author
Zachary Turner
<zturner@google.com>
Wed, 21 Sep 2016 22:29:36 +0000
(22:29 +0000)
committer
Zachary Turner
<zturner@google.com>
Wed, 21 Sep 2016 22:29:36 +0000
(22:29 +0000)
It's a guaranteed crash if you construct a StringRef with
nullptr, so might as well delete the constructor that allows
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282116
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/StringRef.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/StringRef.h
b/include/llvm/ADT/StringRef.h
index
5d0aafc
..
ff423e8
100644
(file)
--- a/
include/llvm/ADT/StringRef.h
+++ b/
include/llvm/ADT/StringRef.h
@@
-68,6
+68,8
@@
namespace llvm {
/// Construct an empty string ref.
/*implicit*/ StringRef() : Data(nullptr), Length(0) {}
+ StringRef(std::nullptr_t) = delete;
+
/// Construct a string ref from a cstring.
/*implicit*/ StringRef(const char *Str)
: Data(Str) {