Files
Sourcetrail/src/lib_cxx/data/parser/cxx/CommentHandler.h
T
Eberhard Graether 713a8eec50 data: Improved file path caching in CXX indexer
* centralized all file path caching in CanonicalFilePathCache
* added cache by clang::FileID
* moved FileRegister into CanonicalFilePathCache and removed it from AST* classes
* only record files once
2018-07-27 12:39:55 +02:00

28 lines
615 B
C++

#ifndef COMMENT_HANDLER_H
#define COMMENT_HANDLER_H
#include <clang/Lex/Preprocessor.h>
class CanonicalFilePathCache;
class ParserClient;
class CommentHandler
: public clang::CommentHandler
{
public:
CommentHandler(
std::shared_ptr<ParserClient> client,
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache
);
virtual ~CommentHandler();
virtual bool HandleComment(clang::Preprocessor& preprocessor, clang::SourceRange sourceRange) override;
private:
std::shared_ptr<ParserClient> m_client;
std::shared_ptr<CanonicalFilePathCache> m_canonicalFilePathCache;
};
#endif // COMMENT_HANDLER_H