From 3d1cd08a4c05e4e2868c7998f45e3972114431a2 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Sun, 7 Sep 2014 23:58:22 +0000 Subject: [PATCH] Suppresses noisy clang/libc++ warnings from SpiderMonkey headers on OS X This was SVN commit r15716. --- source/scriptinterface/ScriptTypes.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/scriptinterface/ScriptTypes.h b/source/scriptinterface/ScriptTypes.h index 2cadcd3d9c..72d45471d5 100644 --- a/source/scriptinterface/ScriptTypes.h +++ b/source/scriptinterface/ScriptTypes.h @@ -51,6 +51,19 @@ # pragma GCC diagnostic ignored "-Wignored-qualifiers" # endif #endif +#if CLANG_VERSION +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wuninitialized" +# pragma clang diagnostic ignored "-Wc++11-extensions" +# pragma clang diagnostic ignored "-Wignored-qualifiers" +// Ugly hack to deal with macro redefinitions from libc++ +# ifdef nullptr +# undef nullptr +# endif +# ifdef decltype +# undef decltype +# endif +#endif #if MSC_VERSION // warnings which are also disabled for the files that include this header @@ -75,6 +88,9 @@ #if MSC_VERSION # pragma warning(pop) #endif +#if CLANG_VERSION +# pragma clang diagnostic pop +#endif #if GCC_VERSION >= 402 # pragma GCC diagnostic warning "-Wunused-parameter" # pragma GCC diagnostic warning "-Wredundant-decls"