Skip to main content

ClangParser Class

Wrapper for to let libclang assisted parsing. More...

Declaration​

class ClangParser { ... }

Included Headers​

#include <src/clangparser.h>

Friends Index​

classClangTUParser

Private Constructors Index​

ClangParser ()

Private Destructor Index​

~ClangParser ()

Public Member Functions Index​

std::unique_ptr< ClangTUParser >createTUParser (const FileDef *fd) const

Private Member Functions Index​

const clang::tooling::CompilationDatabase *database () const

Private Member Attributes Index​

std::unique_ptr< Private >p

Public Static Functions Index​

static ClangParser *instance ()

Returns the one and only instance of the class. More...

Private Static Attributes Index​

static ClangParser *s_instance = nullptr

Description​

Wrapper for to let libclang assisted parsing.

Definition at line 79 of file clangparser.h.

Friends​

ClangTUParser​

friend class ClangTUParser

Definition at line 81 of file clangparser.h.

81 friend class ClangTUParser;

References ClangParser and ClangTUParser.

Referenced by ClangTUParser.

Private Constructors​

ClangParser()​

ClangParser::ClangParser ()

Declaration at line 91 of file clangparser.h, definition at line 995 of file clangparser.cpp.

995ClangParser::ClangParser() : p(std::make_unique<Private>())
996{
997}

Reference p.

Referenced by ClangTUParser and instance.

Private Destructor​

~ClangParser()​

ClangParser::~ClangParser ()
virtual

Declaration at line 93 of file clangparser.h, definition at line 999 of file clangparser.cpp.

Public Member Functions​

createTUParser()​

std::unique_ptr< ClangTUParser > ClangParser::createTUParser (const FileDef * fd)

Declaration at line 85 of file clangparser.h, definition at line 1003 of file clangparser.cpp.

1003std::unique_ptr<ClangTUParser> ClangParser::createTUParser(const FileDef *) const
1004{
1005 return nullptr;
1006}

Referenced by generateFileSources, parseFilesMultiThreading and parseFilesSingleThreading.

Private Member Functions​

database()​

const clang::tooling::CompilationDatabase * ClangParser::database ()

Definition at line 88 of file clangparser.h.

Private Member Attributes​

p​

std::unique_ptr<Private> ClangParser::p

Definition at line 90 of file clangparser.h.

90 std::unique_ptr<Private> p;

Referenced by ClangParser.

Public Static Functions​

instance()​

ClangParser * ClangParser::instance ()
static

Returns the one and only instance of the class.

Declaration at line 84 of file clangparser.h, definition at line 34 of file clangparser.cpp.

35{
36 std::lock_guard<std::mutex> lock(g_clangMutex);
37 if (s_instance==nullptr) s_instance = new ClangParser;
38 return s_instance;
39}

References ClangParser, g_clangMutex and s_instance.

Referenced by generateFileSources, parseFilesMultiThreading and parseFilesSingleThreading.

Private Static Attributes​

s_instance​

ClangParser * ClangParser::s_instance = nullptr
static

Definition at line 94 of file clangparser.h.

Referenced by instance.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.14.0.