[libcxx-commits] [libcxx] [libc++] Simplify the implementation of reserve() and shrink_to_fit() (PR #113453)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 13 01:11:34 PST 2024


================
@@ -2060,6 +2058,21 @@ private:
 #endif
   }
 
+  // Disable ASan annotations and enable them again when going out of scope. It is assumed that the string is in a valid
+  // state at that point, so `size()` can be called safely.
+  struct [[__nodiscard__]] __annotation_guard {
----------------
philnik777 wrote:

This is #114867.

https://github.com/llvm/llvm-project/pull/113453


More information about the libcxx-commits mailing list