Skip to content
Snippets Groups Projects
Commit 07630933 authored by Reid Kleckner's avatar Reid Kleckner
Browse files

[ADT] Delete the Twine assignment operator

This makes it slightly harder to misuse Twines.  It is still possible to
refer to destroyed temporaries with the regular constructors, though.

Patch by Marco Alesiani!

llvm-svn: 209832
parent 816607b8
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,10 @@ namespace llvm {
assert(isValid() && "Invalid twine!");
}
/// Since the intended use of twines is as temporary objects, assignments
/// when concatenating might cause undefined behavior or stack corruptions
Twine &operator=(const Twine &Other) LLVM_DELETED_FUNCTION;
/// isNull - Check for the null twine.
bool isNull() const {
return getLHSKind() == NullKind;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment