This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer_common] Delete some copy/move methods in InternalScopedBuffer
ClosedPublic

Authored by vsk on Sep 21 2016, 10:44 AM.

Details

Summary

The copy assignment operator for InternalScopedBuffer hasn't been deleted properly. This patch deletes the {copy, move} {constructors, assignment operators} and does a clang-format.

This came up because I'd like to write code that takes ownership of an InternalScopedString. We'd need some kind of std::move function available in compiler-rt to do this. I rolled a custom one (since #including <utility> isn't allowed?), but would like to gather feedback on the idea before uploading more patches.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk updated this revision to Diff 72085.Sep 21 2016, 10:44 AM
vsk retitled this revision from to [sanitizer_common] Delete some copy/move methods in InternalScopedBuffer.
vsk updated this object.
vsk added reviewers: kcc, samsonov, eugenis.
vsk added a subscriber: llvm-commits.
kcc accepted this revision.Sep 21 2016, 11:24 AM
kcc edited edge metadata.

LGTM

When sending a patch for review, try to not mix style changes and code changes.

code that takes ownership of an InternalScopedString

I am not sure I want any kind of such complexity in this code, but let's see the patches.

(Also, please stop CC-ing samsonov in code reviews here, he is no longer working on LLVM)

This revision is now accepted and ready to land.Sep 21 2016, 11:24 AM
vsk added a comment.Sep 21 2016, 11:46 AM

Thanks. I'll be more careful to not include formatting changes.

About the patches for std::move: after reading libcxx's implementation, I think it would take too much additional work to write a portable version for compiler-rt. I no longer think there are enough benefits to doing this.

This revision was automatically updated to reflect the committed changes.