diff options
author | Vitaly Buka <vitalybuka@gmail.com> | 2024-01-18 15:42:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 15:42:24 -0800 |
commit | c9eda05a0d2ffcee987e7ff4de6e8115513dfc24 (patch) | |
tree | 12f8ba1be81e4eea167e97a25a231a6d44d8a5b8 | |
parent | 5c150e7eeba9db13cc65b329b3c3537b613ae61d (diff) | |
download | llvm-revert-77394-lambda-fixed.zip llvm-revert-77394-lambda-fixed.tar.gz llvm-revert-77394-lambda-fixed.tar.bz2 |
Revert "[ASan][libc++] Initialize `__r_` variable with lambda"revert-77394-lambda-fixed
-rw-r--r-- | libcxx/include/string | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/string b/libcxx/include/string index 4116f35..ecafb80 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -921,7 +921,7 @@ public: // Turning off ASan instrumentation for variable initialization with _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS // does not work consistently during initialization of __r_, so we instead unpoison __str's memory manually first. // __str's memory needs to be unpoisoned only in the case where it's a short string. - : __r_([](basic_string &__s) -> decltype(__s.__r_)&& { if(!__s.__is_long()) __s.__annotate_delete(); return std::move(__s.__r_); }(__str)) { + : __r_(((__str.__is_long() ? 0 : (__str.__annotate_delete(), 0)), std::move(__str.__r_))) { __str.__r_.first() = __rep(); __str.__annotate_new(0); if (!__is_long()) |