Disable Intellisense-only warnings in simdjson.h/cpp

This commit is contained in:
John Keiser 2020-05-04 11:37:28 -07:00
parent d7f133c24c
commit afb369950c
5 changed files with 22 additions and 14 deletions

View File

@ -11,9 +11,7 @@
#include "simdjson/common_defs.h"
SIMDJSON_PUSH_DISABLE_WARNINGS
#if defined(_MSC_VER) && defined(__clang__)
SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
#endif
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
// Public API
#include "simdjson/simdjson_version.h"

View File

@ -77,9 +77,12 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
#define unlikely(x) x
#endif
#include <CppCoreCheck\Warnings.h>
#define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push ))
#define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 ))
#define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER ))
// Get rid of Intellisense-only warnings (Code Analysis)
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS)
#define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996)
#define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop ))
@ -113,6 +116,11 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable)
#define SIMDJSON_PRAGMA(P) _Pragma(#P)
#define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING)
#if defined(SIMDJSON_CLANG_VISUAL_STUDIO)
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
#else
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
#endif
#define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations)
#define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop")

View File

@ -1,11 +1,9 @@
/* auto-generated on Sat May 2 15:01:27 PDT 2020. Do not edit! */
/* auto-generated on Mon May 4 11:46:14 PDT 2020. Do not edit! */
/* begin file src/simdjson.cpp */
#include "simdjson.h"
SIMDJSON_PUSH_DISABLE_WARNINGS
#if defined(SIMDJSON_CLANG_VISUAL_STUDIO)
SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
#endif
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
/* begin file src/error.cpp */

View File

@ -1,4 +1,4 @@
/* auto-generated on Sat May 2 15:01:27 PDT 2020. Do not edit! */
/* auto-generated on Mon May 4 11:46:14 PDT 2020. Do not edit! */
/* begin file include/simdjson.h */
#ifndef SIMDJSON_H
#define SIMDJSON_H
@ -328,9 +328,12 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
#define unlikely(x) x
#endif
#include <CppCoreCheck\Warnings.h>
#define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push ))
#define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 ))
#define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER ))
// Get rid of Intellisense-only warnings (Code Analysis)
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS)
#define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996)
#define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop ))
@ -364,6 +367,11 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable)
#define SIMDJSON_PRAGMA(P) _Pragma(#P)
#define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING)
#if defined(SIMDJSON_CLANG_VISUAL_STUDIO)
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
#else
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
#endif
#define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations)
#define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop")
@ -1971,9 +1979,7 @@ namespace std {
/* end file include/simdjson/nonstd/string_view.hpp */
SIMDJSON_PUSH_DISABLE_WARNINGS
#if defined(_MSC_VER) && defined(__clang__)
SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
#endif
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
// Public API
/* begin file include/simdjson/simdjson_version.h */

View File

@ -1,9 +1,7 @@
#include "simdjson.h"
SIMDJSON_PUSH_DISABLE_WARNINGS
#if defined(SIMDJSON_CLANG_VISUAL_STUDIO)
SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
#endif
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
#include "error.cpp"
#include "implementation.cpp"