Adapt to changes in c++utilities

This commit is contained in:
Martchus 2019-06-14 19:16:51 +02:00
parent 8cac133104
commit 6542eab80d
8 changed files with 14 additions and 15 deletions

View File

@ -81,10 +81,10 @@ if (TARGET reflective_rapidjson_generator_tests)
CLANG_OPTIONS_FROM_TARGETS
reflective_rapidjson_generator_tests
JSON_CLASSES
OtherNotJsonSerializable # test specifying classes for JSON (de)serialization manually
SomeOtherClassName # specifying a class that does not exist should not cause any problems
OtherNotJsonSerializable # test specifying classes for JSON (de)serialization manually
SomeOtherClassName # specifying a class that does not exist should not cause any problems
JSON_VISIBILITY
LIB_EXPORT # not required, just to test setting visibility
CPP_UTILITIES_GENERIC_LIB_EXPORT # not required, just to test setting visibility
)
# cmake-format: on
list(APPEND TEST_HEADER_FILES ${TEST_GENERATED_HEADER_FILES})

View File

@ -23,7 +23,7 @@ BinarySerializationCodeGenerator::Options::Options()
{
additionalClassesArg.setRequiredValueCount(Argument::varValueCount);
additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None);
visibilityArg.setPreDefinedCompletionValues("LIB_EXPORT");
visibilityArg.setPreDefinedCompletionValues("CPP_UTILITIES_GENERIC_LIB_EXPORT");
}
BinarySerializationCodeGenerator::BinarySerializationCodeGenerator(CodeFactory &factory, const Options &options)

View File

@ -19,7 +19,7 @@ CodeGenerator::~CodeGenerator()
*/
void CodeGenerator::addDeclaration(clang::Decl *decl)
{
VAR_UNUSED(decl)
CPP_UTILITIES_UNUSED(decl)
}
/*!

View File

@ -16,7 +16,7 @@ bool FrontendAction::hasCodeCompletionSupport() const
REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE(clang::ASTConsumer)
FrontendAction::CreateASTConsumer(clang::CompilerInstance &compilerInstance, llvm::StringRef inputFile)
{
VAR_UNUSED(inputFile)
CPP_UTILITIES_UNUSED(inputFile)
// propagate compiler instance to factory
m_factory.setCompilerInstance(&compilerInstance);

View File

@ -23,7 +23,7 @@ JsonSerializationCodeGenerator::Options::Options()
{
additionalClassesArg.setRequiredValueCount(Argument::varValueCount);
additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None);
visibilityArg.setPreDefinedCompletionValues("LIB_EXPORT");
visibilityArg.setPreDefinedCompletionValues("CPP_UTILITIES_GENERIC_LIB_EXPORT");
}
JsonSerializationCodeGenerator::JsonSerializationCodeGenerator(CodeFactory &factory, const Options &options)

View File

@ -36,8 +36,7 @@ inline void assertEqualityLinewise(const Iteratable &iteratable1, const Iteratab
}
}
if (!differentLines.empty()) {
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"the following lines differ: " + CppUtilities::joinStrings(differentLines, ", "), iteratable1, iteratable2);
CPPUNIT_ASSERT_EQUAL_MESSAGE("the following lines differ: " + CppUtilities::joinStrings(differentLines, ", "), iteratable1, iteratable2);
}
}

View File

@ -34,7 +34,7 @@ bool Visitor::VisitDecl(clang::Decl *decl)
*/
bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func)
{
VAR_UNUSED(func)
CPP_UTILITIES_UNUSED(func)
return true;
}
@ -43,7 +43,7 @@ bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func)
*/
bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st)
{
VAR_UNUSED(st)
CPP_UTILITIES_UNUSED(st)
return true;
}
@ -52,7 +52,7 @@ bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st)
*/
bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl)
{
VAR_UNUSED(decl)
CPP_UTILITIES_UNUSED(decl)
return true;
}
@ -61,7 +61,7 @@ bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl)
*/
bool Visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *decl)
{
VAR_UNUSED(decl)
CPP_UTILITIES_UNUSED(decl)
return true;
}

View File

@ -10,8 +10,8 @@
#define REFLECTIVE_RAPIDJSON_EXPORT
#define REFLECTIVE_RAPIDJSON_IMPORT
#else
#define REFLECTIVE_RAPIDJSON_EXPORT LIB_EXPORT
#define REFLECTIVE_RAPIDJSON_IMPORT LIB_IMPORT
#define REFLECTIVE_RAPIDJSON_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define REFLECTIVE_RAPIDJSON_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!