Reflection for RapidJSON
0.0.17
Reflection for serializing/deserializing with RapidJSON
Toggle main menu visibility
Loading...
Searching...
No Matches
frontendaction.cpp
Go to the documentation of this file.
1
#include "
./frontendaction.h
"
2
#include "
./codefactory.h
"
3
#include "
./consumer.h
"
4
5
#include <c++utilities/application/global.h>
6
7
using namespace
std;
8
9
namespace
ReflectiveRapidJSON
{
10
11
bool
FrontendAction::hasCodeCompletionSupport
()
const
12
{
13
return
true
;
14
}
15
16
REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE
(clang::ASTConsumer)
17
FrontendAction
::
CreateASTConsumer
(
clang
::CompilerInstance &compilerInstance, llvm::StringRef inputFile)
18
{
19
CPP_UTILITIES_UNUSED(inputFile)
20
21
// propagate compiler instance to factory
22
m_factory.setCompilerInstance(&compilerInstance);
23
24
// turn some errors into warnings
25
compilerInstance.getDiagnostics().setClient(
26
new
DiagConsumer
(std::unique_ptr<clang::DiagnosticConsumer>(compilerInstance.getDiagnostics().takeClient()), m_factory.isErrorResilient()));
27
28
return
maybe_unique
(
new
Consumer
(m_factory, compilerInstance));
29
}
30
}
// namespace ReflectiveRapidJSON
REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE
#define REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE(t)
The REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE macro either expands to a std::unique_ptr or a raw pointer depe...
Definition
clangversionabstraction.h:45
ReflectiveRapidJSON::Consumer::Consumer
Consumer(CodeFactory &factory, clang::CompilerInstance &compilerInstance)
Definition
consumer.h:41
ReflectiveRapidJSON::DiagConsumer::DiagConsumer
DiagConsumer(std::unique_ptr< DiagnosticConsumer > previous, bool errorResilient)
Definition
consumer.h:71
ReflectiveRapidJSON::FrontendAction::CreateASTConsumer
CreateASTConsumer(clang::CompilerInstance &compilerInstance, llvm::StringRef inputFile) override
Definition
frontendaction.cpp:17
ReflectiveRapidJSON::FrontendAction::FrontendAction
FrontendAction(CodeFactory &factory)
Definition
frontendaction.h:27
ReflectiveRapidJSON::FrontendAction::hasCodeCompletionSupport
bool hasCodeCompletionSupport() const override
Definition
frontendaction.cpp:11
codefactory.h
consumer.h
frontendaction.h
ReflectiveRapidJSON
Definition
codegenerator.h:15
ReflectiveRapidJSON::maybe_unique
MaybeUnique< T > maybe_unique(T *val)
Definition
clangversionabstraction.h:28
clang
Definition
codegenerator.h:8
Generated on
for Reflection for RapidJSON by
1.18.0