Bug 1535651. Whitelist std::__pair_base as memmovable for static analysis purposes. r=emilio
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 15 Mar 2019 16:17:52 +0000
changeset 464403 4b6ece1be5c2
parent 464402 e05c19c17c88
child 464404 1391a8e01835
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1535651
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1535651. Whitelist std::__pair_base as memmovable for static analysis purposes. r=emilio In at least some libstdc++ versions, std::pair (which we want to be memmovable) inherits from __pair_base. We have a similar setup already for __atomic_base. Differential Revision: https://phabricator.services.mozilla.com/D23698
build/clang-plugin/MemMoveAnnotation.h
--- a/build/clang-plugin/MemMoveAnnotation.h
+++ b/build/clang-plugin/MemMoveAnnotation.h
@@ -22,16 +22,17 @@ protected:
     // 1201314 for discussion.
     if (getDeclarationNamespace(D) == "std") {
       // This doesn't check that it's really ::std::pair and not
       // ::std::something_else::pair, but should be good enough.
       StringRef Name = getNameChecked(D);
       if (Name == "pair" || Name == "atomic" ||
           // libstdc++ specific names
           Name == "__atomic_base" || Name == "atomic_bool" ||
+          Name == "__pair_base" ||
           // MSVCRT specific names
           Name == "_Atomic_impl" || Name == "_Atomic_base" ||
           Name == "_Atomic_bool" || Name == "_Atomic_char" ||
           Name == "_Atomic_schar" || Name == "_Atomic_uchar" ||
           Name == "_Atomic_char16_t" || Name == "_Atomic_char32_t" ||
           Name == "_Atomic_wchar_t" || Name == "_Atomic_short" ||
           Name == "_Atomic_ushort" || Name == "_Atomic_int" ||
           Name == "_Atomic_uint" || Name == "_Atomic_long" ||