Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
0fdd8040
Commit
0fdd8040
authored
Apr 06, 2018
by
Zoltan Kovago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation on windows with clang
parent
8022a5f7
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
41 additions
and
55 deletions
+41
-55
document.h
include/rapidjson/document.h
+3
-5
encodings.h
include/rapidjson/encodings.h
+2
-2
meta.h
include/rapidjson/internal/meta.h
+7
-2
regex.h
include/rapidjson/internal/regex.h
+5
-7
istreamwrapper.h
include/rapidjson/istreamwrapper.h
+1
-3
pointer.h
include/rapidjson/pointer.h
+2
-8
rapidjson.h
include/rapidjson/rapidjson.h
+1
-1
reader.h
include/rapidjson/reader.h
+5
-11
schema.h
include/rapidjson/schema.h
+1
-3
writer.h
include/rapidjson/writer.h
+4
-10
istreamwrappertest.cpp
test/unittest/istreamwrappertest.cpp
+2
-2
schematest.cpp
test/unittest/schematest.cpp
+8
-1
No files found.
include/rapidjson/document.h
View file @
0fdd8040
...
@@ -26,15 +26,13 @@
...
@@ -26,15 +26,13 @@
#include <limits>
#include <limits>
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
#ifdef _MSC_VER
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
RAPIDJSON_DIAG_OFF
(
4244
)
// conversion from kXxxFlags to 'uint16_t', possible loss of data
#endif
#ifdef __clang__
#ifdef __clang__
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
RAPIDJSON_DIAG_OFF
(
4244
)
// conversion from kXxxFlags to 'uint16_t', possible loss of data
#endif
#endif
#ifdef __GNUC__
#ifdef __GNUC__
...
...
include/rapidjson/encodings.h
View file @
0fdd8040
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "rapidjson.h"
#include "rapidjson.h"
#if
def _MSC_VER
#if
defined(_MSC_VER) && !defined(__clang__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4244
)
// conversion from 'type1' to 'type2', possible loss of data
RAPIDJSON_DIAG_OFF
(
4244
)
// conversion from 'type1' to 'type2', possible loss of data
RAPIDJSON_DIAG_OFF
(
4702
)
// unreachable code
RAPIDJSON_DIAG_OFF
(
4702
)
// unreachable code
...
@@ -709,7 +709,7 @@ struct Transcoder<Encoding, Encoding> {
...
@@ -709,7 +709,7 @@ struct Transcoder<Encoding, Encoding> {
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__) ||
defined(_MSC_VER
)
#if defined(__GNUC__) ||
(defined(_MSC_VER) && !defined(__clang__)
)
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
...
include/rapidjson/internal/meta.h
View file @
0fdd8040
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
effc
++
)
RAPIDJSON_DIAG_OFF
(
effc
++
)
#endif
#endif
#if defined(_MSC_VER)
#if defined(_MSC_VER) && !defined(__clang__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
6334
)
RAPIDJSON_DIAG_OFF
(
6334
)
#endif
#endif
...
@@ -174,7 +175,11 @@ template <typename T> struct RemoveSfinaeTag<SfinaeTag&(*)(T)> { typedef T Type;
...
@@ -174,7 +175,11 @@ template <typename T> struct RemoveSfinaeTag<SfinaeTag&(*)(T)> { typedef T Type;
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
//@endcond
//@endcond
#if defined(__GNUC__) || defined(_MSC_VER)
#if defined(_MSC_VER) && !defined(__clang__)
RAPIDJSON_DIAG_POP
#endif
#ifdef __GNUC__
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
...
include/rapidjson/internal/regex.h
View file @
0fdd8040
...
@@ -24,6 +24,9 @@ RAPIDJSON_DIAG_PUSH
...
@@ -24,6 +24,9 @@ RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
implicit
-
fallthrough
)
RAPIDJSON_DIAG_OFF
(
implicit
-
fallthrough
)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
#endif
#endif
#ifdef __GNUC__
#ifdef __GNUC__
...
@@ -34,11 +37,6 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough)
...
@@ -34,11 +37,6 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough)
#endif
#endif
#endif
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
#endif
#ifndef RAPIDJSON_REGEX_VERBOSE
#ifndef RAPIDJSON_REGEX_VERBOSE
#define RAPIDJSON_REGEX_VERBOSE 0
#define RAPIDJSON_REGEX_VERBOSE 0
#endif
#endif
...
@@ -723,11 +721,11 @@ typedef GenericRegexSearch<Regex> RegexSearch;
...
@@ -723,11 +721,11 @@ typedef GenericRegexSearch<Regex> RegexSearch;
}
// namespace internal
}
// namespace internal
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
#ifdef __
clang
__
#ifdef __
GNUC
__
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
#if
def _MSC_VER
#if
defined(__clang__) || defined(_MSC_VER)
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
...
include/rapidjson/istreamwrapper.h
View file @
0fdd8040
...
@@ -21,9 +21,7 @@
...
@@ -21,9 +21,7 @@
#ifdef __clang__
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
padded
)
#endif
#elif defined(_MSC_VER)
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4351
)
// new behavior: elements of array 'array' will be default initialized
RAPIDJSON_DIAG_OFF
(
4351
)
// new behavior: elements of array 'array' will be default initialized
#endif
#endif
...
...
include/rapidjson/pointer.h
View file @
0fdd8040
...
@@ -21,9 +21,7 @@
...
@@ -21,9 +21,7 @@
#ifdef __clang__
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
#endif
#elif defined(_MSC_VER)
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
#endif
#endif
...
@@ -1352,11 +1350,7 @@ bool EraseValueByPointer(T& root, const CharType(&source)[N]) {
...
@@ -1352,11 +1350,7 @@ bool EraseValueByPointer(T& root, const CharType(&source)[N]) {
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
#ifdef __clang__
#if defined(__clang__) || defined(_MSC_VER)
RAPIDJSON_DIAG_POP
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
...
include/rapidjson/rapidjson.h
View file @
0fdd8040
...
@@ -433,7 +433,7 @@ template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
...
@@ -433,7 +433,7 @@ template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
template
<
size_t
x
>
struct
StaticAssertTest
{};
template
<
size_t
x
>
struct
StaticAssertTest
{};
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__)
#if defined(__GNUC__)
|| defined(__clang__)
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
#else
#else
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
...
...
include/rapidjson/reader.h
View file @
0fdd8040
...
@@ -37,17 +37,15 @@
...
@@ -37,17 +37,15 @@
#include <arm_neon.h>
#include <arm_neon.h>
#endif
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
RAPIDJSON_DIAG_OFF
(
4702
)
// unreachable code
#endif
#ifdef __clang__
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
old
-
style
-
cast
)
RAPIDJSON_DIAG_OFF
(
old
-
style
-
cast
)
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
RAPIDJSON_DIAG_OFF
(
4702
)
// unreachable code
#endif
#endif
#ifdef __GNUC__
#ifdef __GNUC__
...
@@ -2206,7 +2204,7 @@ typedef GenericReader<UTF8<>, UTF8<> > Reader;
...
@@ -2206,7 +2204,7 @@ typedef GenericReader<UTF8<>, UTF8<> > Reader;
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
#if
def __clang__
#if
defined(__clang__) || defined(_MSC_VER)
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
@@ -2215,8 +2213,4 @@ RAPIDJSON_DIAG_POP
...
@@ -2215,8 +2213,4 @@ RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_READER_H_
#endif // RAPIDJSON_READER_H_
include/rapidjson/schema.h
View file @
0fdd8040
...
@@ -63,9 +63,7 @@ RAPIDJSON_DIAG_OFF(weak-vtables)
...
@@ -63,9 +63,7 @@ RAPIDJSON_DIAG_OFF(weak-vtables)
RAPIDJSON_DIAG_OFF
(
exit
-
time
-
destructors
)
RAPIDJSON_DIAG_OFF
(
exit
-
time
-
destructors
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
-
pedantic
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
-
pedantic
)
RAPIDJSON_DIAG_OFF
(
variadic
-
macros
)
RAPIDJSON_DIAG_OFF
(
variadic
-
macros
)
#endif
#elif defined(_MSC_VER)
#ifdef _MSC_VER
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
#endif
#endif
...
...
include/rapidjson/writer.h
View file @
0fdd8040
...
@@ -36,16 +36,14 @@
...
@@ -36,16 +36,14 @@
#include <arm_neon.h>
#include <arm_neon.h>
#endif
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
#endif
#ifdef __clang__
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
unreachable
-
code
)
RAPIDJSON_DIAG_OFF
(
unreachable
-
code
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
#endif
#endif
RAPIDJSON_NAMESPACE_BEGIN
RAPIDJSON_NAMESPACE_BEGIN
...
@@ -705,11 +703,7 @@ inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, siz
...
@@ -705,11 +703,7 @@ inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, siz
RAPIDJSON_NAMESPACE_END
RAPIDJSON_NAMESPACE_END
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__clang__)
RAPIDJSON_DIAG_POP
#endif
#ifdef __clang__
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
...
test/unittest/istreamwrappertest.cpp
View file @
0fdd8040
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include <sstream>
#include <sstream>
#include <fstream>
#include <fstream>
#if
def _MSC_VER
#if
defined(_MSC_VER) && !defined(__clang__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4702
)
// unreachable code
RAPIDJSON_DIAG_OFF
(
4702
)
// unreachable code
#endif
#endif
...
@@ -176,6 +176,6 @@ TEST(IStreamWrapper, wfstream) {
...
@@ -176,6 +176,6 @@ TEST(IStreamWrapper, wfstream) {
#endif
#endif
#if
def _MSC_VER
#if
defined(_MSC_VER) && !defined(__clang__)
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
test/unittest/schematest.cpp
View file @
0fdd8040
...
@@ -20,6 +20,9 @@
...
@@ -20,6 +20,9 @@
#ifdef __clang__
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
variadic
-
macros
)
RAPIDJSON_DIAG_OFF
(
variadic
-
macros
)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4822
)
// local class member function does not have a body
#endif
#endif
using
namespace
rapidjson
;
using
namespace
rapidjson
;
...
@@ -2007,6 +2010,10 @@ TEST(SchemaValidator, Ref_remote) {
...
@@ -2007,6 +2010,10 @@ TEST(SchemaValidator, Ref_remote) {
TEST
(
SchemaValidator
,
Ref_remote_issue1210
)
{
TEST
(
SchemaValidator
,
Ref_remote_issue1210
)
{
class
SchemaDocumentProvider
:
public
IRemoteSchemaDocumentProvider
{
class
SchemaDocumentProvider
:
public
IRemoteSchemaDocumentProvider
{
SchemaDocument
**
collection
;
SchemaDocument
**
collection
;
SchemaDocumentProvider
(
const
SchemaDocumentProvider
&
);
SchemaDocumentProvider
&
operator
=
(
const
SchemaDocumentProvider
&
);
public
:
public
:
SchemaDocumentProvider
(
SchemaDocument
**
collection
)
:
collection
(
collection
)
{
}
SchemaDocumentProvider
(
SchemaDocument
**
collection
)
:
collection
(
collection
)
{
}
virtual
const
SchemaDocument
*
GetRemoteDocument
(
const
char
*
uri
,
SizeType
length
)
{
virtual
const
SchemaDocument
*
GetRemoteDocument
(
const
char
*
uri
,
SizeType
length
)
{
...
@@ -2033,6 +2040,6 @@ TEST(SchemaValidator, Ref_remote_issue1210) {
...
@@ -2033,6 +2040,6 @@ TEST(SchemaValidator, Ref_remote_issue1210) {
VALIDATE
(
sx
,
"{
\"
country
\"
:
\"
US
\"
}"
,
true
);
VALIDATE
(
sx
,
"{
\"
country
\"
:
\"
US
\"
}"
,
true
);
}
}
#if
def __clang__
#if
defined(_MSC_VER) || defined(__clang__)
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment