Martchus
2b0048f144
Change (de)serialization order of versioning and base classes
...
This allows deserializing the first base class on its own, even then the
derived class has been serialized. That makes sense if the full object (of
the derived class) should be stored but sometimes only the "base fields"
(of the base class) are needed.
2022-05-28 18:46:21 +02:00
Martchus
60d761f7ed
Pass version down to base classes in binary deserializer
...
So the behavior is consistent with readng members and with serialization.
It should be fine because if the base class is versioned it won't make a
difference but if it is versioned the version from the derived class can be
utilized.
2022-05-15 21:00:02 +02:00
Martchus
9c3bf01c8f
Avoid warnings about unused var `allocator` for empty classes
2022-05-15 20:52:30 +02:00
Martchus
a6b9d771aa
Do not treat warning "'this' pointer is null" appearing with GCC 12 as error
...
It is about code included from libclang and likely wrong so let's just not
abort the compilation due to it.
2022-05-12 20:23:33 +02:00
Martchus
2cc044c705
Adapt tests to efaa8a8
2022-03-28 17:06:28 +02:00
Martchus
efaa8a8441
Avoid warnings about using uninitialized variable
2022-02-22 20:03:49 +01:00
Martchus
8b66ca3e6b
Avoid using `DeclBase::getLangOpts()` to support older Clang versions
...
The `DeclBase::getLangOpts()` is merely a convenience but only available
in Clang 11 or newer.
2021-09-19 01:17:30 +02:00
Martchus
44c6b8c609
Throw exception during binary deserialization when version is not supported
2021-07-25 19:19:02 +02:00
Martchus
0a902ac30c
Add experimental versioning for binary (de)serializer
2021-07-13 00:37:05 +02:00
Martchus
5e72012ed5
Fix typos found via `codespell --skip .git -w`
2021-07-03 19:50:25 +02:00
Martchus
a4dd52acfa
Define REFLECTIVE_RAPIDJSON_GENERATOR macro during generator runs
...
So one can distinguish regular compilation from the generator run by
checking this macro.
2021-05-16 19:25:36 +02:00
Martchus
e3d32ddfa1
Use std::string_view for CodeFactory parameters (where possible)
2021-05-16 19:25:30 +02:00
Martchus
8f1909dfdf
Exit when parsing arguments fails
2021-05-13 16:56:27 +02:00
Martchus
874c964e0b
Prevent warnings about unused variables in generated code
2021-03-22 14:16:40 +01:00
Martchus
6252a7335a
Apply cmake-format and clang-format
2020-12-05 21:29:55 +01:00
Martchus
4ff49156da
Apply clang-format
2020-05-28 12:02:22 +02:00
otreblan
beb4491b18
Fix missing header in gcc10
2020-05-27 22:20:22 -05:00
Martchus
8c032ee7a6
Fix compatibility with LLVM/Clang 10
2020-04-12 17:22:37 +02:00
Martchus
891b96a38f
Fix build with custom target suffix
2020-01-31 19:49:18 +01:00
Martchus
c68d9ea384
Format CMake files with cmake-format 0.6.7
2020-01-26 20:42:03 +01:00
Martchus
e7bbdd0af6
Allow logging the exact list of options passed to clang
...
Since the options get splitted and not just passed as-is
this can be useful for debugging.
2020-01-26 20:41:34 +01:00
Martchus
03563aafbf
Fix generator tests; it needs C++17
2019-11-14 18:13:39 +01:00
Martchus
f75c8d77a2
Fix finding LibTooling when 'clang-cpp' target is used
...
See https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html#build-system-changes
2019-11-14 17:18:49 +01:00
Martchus
7e5a32265d
Add CLI help and completion for binary generator
2019-10-05 01:36:21 +02:00
Martchus
fecde7d2d1
Improve adding RapidJSON include dirs to tests
...
* Also check for `RapidJSON_INCLUDE_DIRS` which seems to be used now
* Do not add `-I` without subsequent path if the include directory
is missing/empty which would lead to the Clang error:
`error: unable to handle compilation, expected exactly one compiler job in ''`
2019-08-09 17:54:08 +02:00
Martchus
8f06bf0272
Do not call vector::reserve() in loop
2019-06-20 22:54:17 +02:00
Martchus
6542eab80d
Adapt to changes in c++utilities
2019-06-14 19:16:51 +02:00
Martchus
8cac133104
Adapt to changes in c++utilities
2019-06-10 22:46:06 +02:00
Martchus
dd174920fe
Adapt to c++utilities v5
2019-05-04 16:09:58 +02:00
Martchus
669aa16479
Fix building against LLVM/Clang 8
2019-03-27 14:41:57 +01:00
Martchus
b058e9e9b9
Fix include for "empty" case in generator tests
2019-02-13 11:39:09 +01:00
Martchus
1f6fade6c2
Apply cmake-format
2019-02-09 21:25:11 +01:00
Martchus
39dcba215e
Let CMake generate code for test application
2019-01-13 22:27:35 +01:00
Martchus
ef27d71f43
Fix multiple definition error caused by forward declarations
2018-11-08 00:38:45 +01:00
Martchus
aa92cab4e5
Test pointer handling of binary serialization
2018-10-28 21:35:32 +01:00
Martchus
5835cd85a5
Remove unused createFileIDForMemBuffer()
2018-09-04 19:39:32 +02:00
Martchus
25e7891573
Apply clang-format
2018-06-26 00:10:44 +02:00
Martchus
f140c7f436
Use C++ 17
2018-06-26 00:07:59 +02:00
Martchus
c170993392
Reduce code duplication between serialization generators
2018-06-23 18:04:30 +02:00
Martchus
e93be04e35
Implement generator for binary (de)serialization
...
Still need to refactor common code with the JSON generator.
2018-06-23 17:25:30 +02:00
Martchus
9dc7bd371c
Apply clang-format
2018-06-23 14:35:53 +02:00
Martchus
8628427e6d
Fix usage of enable_if with GCC 8
...
Seems like the trick with the three dots isn't working
with GCC 8 anymore. So let's make it a default template
parameter then.
Not sure whether GCC 8 is here correct and whether this
workaround causes further trouble.
2018-05-07 23:48:37 +02:00
Martchus
36463cd6dc
Apply clang-format from LLVM 6
2018-04-04 20:31:49 +02:00
Martchus
7db20f5ad5
List all required LLVM/Clang libraries explicitely
...
Those libraries are direct dependencies and must be listed
explicitely when linking dynamically because transitive
dependencies of clangTooling are not pulled automatically
by CMake in this case.
This is required to use LLVM 6 which has switched to dynamic
libraries (at least under Arch Linux).
2018-03-14 18:33:15 +01:00
Martchus
f0870d3a54
Test with size_t (defined in Clang's builtin headers)
2018-02-03 16:14:20 +01:00
Martchus
2098ff702e
fixup! Do not turn errors into warnings by default
2018-02-03 16:10:01 +01:00
Martchus
d1fe76f322
Use mutable instead of const_cast
2018-02-03 16:09:31 +01:00
Martchus
8587d62583
Do not turn errors into warnings by default
...
Not required anymore since the resource dir is specified
correctly.
2018-02-03 15:47:25 +01:00
Martchus
21e7f83995
Improve documentation
2018-02-03 15:45:15 +01:00
Martchus
54d4a15d4f
Set Clang's resource dir and platform triple correctly
...
* The option `-resource-dir` must be specified to
point to Clang's resource directory containing built-in
header files. Then the massive warnings are gone.
* Setting the platform triple seems to be the right way
for cross-compilation. Note that the stdlib.h still needs
to be worked around.
2018-02-03 15:44:10 +01:00