Bug 1333939 - Remove -Wno-invalid-constexpr from clang-cl config. r=froydnj
authorDavid Major <dmajor@mozilla.com>
Thu, 26 Jan 2017 13:26:01 +1300
changeset 466671 9e55d80cc4a819f1ab122e77f28edbe5d18a2bd6
parent 466670 c8145ad1dcf8d8e5d8387063d8ea8f22e600cfef
child 466672 b2c4e4641643e39e317e3bbf2c940bfb788a884e
push id42948
push userbmo:gasolin@mozilla.com
push dateThu, 26 Jan 2017 07:49:21 +0000
reviewersfroydnj
bugs1333939
milestone54.0a1
Bug 1333939 - Remove -Wno-invalid-constexpr from clang-cl config. r=froydnj The constexpr warning no longer appears in VS2015 headers. I spot-checked a few other warnings in the list, and we still need to keep them. Notably, we still need -Wno-ignored-attributes, but now for a different reason! MozReview-Commit-ID: LMqJX1KlAra
js/src/old-configure.in
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -731,21 +731,16 @@ case "$target" in
             # XXX We should combine some of these with our generic GCC-style
             # warning checks.
             #
             # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
             CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
             # We use offsetof on non-POD objects all the time.
             # We also suppress this warning on other platforms.
             CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof"
-            # MFBT thinks clang-cl supports constexpr, which it does, but
-            # not everything in Windows C++ headers supports constexpr
-            # as we might expect until MSVC 2015, so turn off this warning
-            # for now.
-            CXXFLAGS="$CXXFLAGS -Wno-invalid-constexpr"
             # This warns for reasonable things like:
             #   enum { X = 0xffffffffU };
             # which is annoying for IDL headers.
             CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value"
             # This warns for cases that would be reached by the Microsoft
             # #include rules, but also currently warns on cases that would
             # *also* be reached by standard C++ include rules.  That
             # behavior doesn't seem useful, so we turn it off.
@@ -782,20 +777,18 @@ case "$target" in
             # tree.  clang-cl doesn't support -fno-exceptions or equivalent,
             # so there doesn't seem to be any way to convince clang-cl to
             # declare |delete| differently.  Therefore, suppress this
             # warning.
             CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch"
             # At least one MSVC header and several headers in-tree have
             # unused typedefs, so turn this on.
             CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"
-            # Several JS engine header files use __declspec(dllimport) on
-            # classes, and clang-cl helpfully warns about its non-support
-            # for such cases.  We're not particularly worried about that,
-            # so ignore that warning.
+            # jemalloc uses __declspec(allocator) as a profiler hint,
+            # which clang-cl doesn't understand.
             CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes"
         fi
         # make 'foo == bar;' error out
         CFLAGS="$CFLAGS -we4553"
         CXXFLAGS="$CXXFLAGS -we4553"
         LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib"
         MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
         WARNINGS_AS_ERRORS='-WX'
--- a/old-configure.in
+++ b/old-configure.in
@@ -1040,21 +1040,16 @@ case "$target" in
             # XXX We should combine some of these with our generic GCC-style
             # warning checks.
             #
             # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
             CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
             # We use offsetof on non-POD objects all the time.
             # We also suppress this warning on other platforms.
             CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof"
-            # MFBT thinks clang-cl supports constexpr, which it does, but
-            # not everything in Windows C++ headers supports constexpr
-            # as we might expect until MSVC 2015, so turn off this warning
-            # for now.
-            CXXFLAGS="$CXXFLAGS -Wno-invalid-constexpr"
             # This warns for reasonable things like:
             #   enum { X = 0xffffffffU };
             # which is annoying for IDL headers.
             CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value"
             # This warns for cases that would be reached by the Microsoft
             # #include rules, but also currently warns on cases that would
             # *also* be reached by standard C++ include rules.  That
             # behavior doesn't seem useful, so we turn it off.
@@ -1091,20 +1086,18 @@ case "$target" in
             # tree.  clang-cl doesn't support -fno-exceptions or equivalent,
             # so there doesn't seem to be any way to convince clang-cl to
             # declare |delete| differently.  Therefore, suppress this
             # warning.
             CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch"
             # At least one MSVC header and several headers in-tree have
             # unused typedefs, so turn this on.
             CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"
-            # Several JS engine header files use __declspec(dllimport) on
-            # classes, and clang-cl helpfully warns about its non-support
-            # for such cases.  We're not particularly worried about that,
-            # so ignore that warning.
+            # jemalloc uses __declspec(allocator) as a profiler hint,
+            # which clang-cl doesn't understand.
             CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes"
         fi
         # make 'foo == bar;' error out
         CFLAGS="$CFLAGS -we4553"
         CXXFLAGS="$CXXFLAGS -we4553"
         LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib"
         MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
         WARNINGS_AS_ERRORS='-WX'