Skip to content

Commit 6c83565

Browse files
author
Tacet
authored
[libc++][ASan] Fix std::basic_string trait type (#91590)
Addresses the comment: #79536 (comment) Changes the type to `void` instead of `false_type`. The value is used here: https://github.com/llvm/llvm-project/blob/6f1013a5b3f92d3ae6e378d6706584a2a44e6964/libcxx/include/__type_traits/is_trivially_relocatable.h#L35-L38
1 parent 937643b commit 6c83565

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/include/string

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ public:
741741
// is kept inside objects memory (short string optimization), instead of in allocated
742742
// external memory. In such cases, the destructor is responsible for unpoisoning
743743
// the memory to avoid triggering false positives.
744-
// Therefore it's crucial to ensure the destructor is called
745-
using __trivially_relocatable = false_type;
744+
// Therefore it's crucial to ensure the destructor is called.
745+
using __trivially_relocatable = void;
746746
#else
747747
using __trivially_relocatable = __conditional_t<
748748
__libcpp_is_trivially_relocatable<allocator_type>::value && __libcpp_is_trivially_relocatable<pointer>::value,

0 commit comments

Comments
 (0)