Skip to content

Commit 1ea7a56

Browse files
author
Advenam Tacet
committed
Revert "[ASan][libc++] String annotations optimizations fix with lambda (#76200)"
This reverts commit c68a9d2.
1 parent faa326d commit 1ea7a56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/string

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ public:
922922
// Turning off ASan instrumentation for variable initialization with _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
923923
// does not work consistently during initialization of __r_, so we instead unpoison __str's memory manually first.
924924
// __str's memory needs to be unpoisoned only in the case where it's a short string.
925-
: __r_([](basic_string &__s){ if(!__s.__is_long()) __s.__annotate_delete(); return std::move(__s.__r_); }(__str)) {
925+
: __r_(((__str.__is_long() ? 0 : (__str.__annotate_delete(), 0)), std::move(__str.__r_))) {
926926
__str.__r_.first() = __rep();
927927
__str.__annotate_new(0);
928928
if (!__is_long())

0 commit comments

Comments
 (0)