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 522076 4b6ece1be5c2d4a095c42cf76bdc42120f0da872
parent 522075 e05c19c17c88d69bbad0646b3839564a082179a3
child 522077 1391a8e0183535b6f56586c844d2bbcc543e8237
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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" ||