/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * Based on LLVM/Clang. * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. *
*/
// Used internally by PluginHandler::isAllRelevantCodeDefined and its (free) helper functions: typedef llvm::DenseMap<const CXXRecordDecl*, bool> RecordCompleteMap;
/** Class that manages all LO modules.
*/ class PluginHandler
: public ASTConsumer
{ public:
PluginHandler( CompilerInstance& compiler, const std::vector< std::string >& args ); virtual ~PluginHandler(); virtualvoid HandleTranslationUnit( ASTContext& context ) override; staticvoid registerPlugin( Plugin* (*create)( const InstantiationData& ), constchar* optionName, bool isPPCallback, bool isSharedPlugin, bool byDefault );
DiagnosticBuilder report( DiagnosticsEngine::Level level, constchar * plugin, StringRef message,
CompilerInstance& compiler, SourceLocation loc = SourceLocation()); bool ignoreLocation(SourceLocation loc); bool isDebugMode() const { return debugMode; } staticbool isUnitTestMode(); // If we overlap with a previous area we modified, we cannot perform this change // without corrupting the source bool checkOverlap(SourceRange range); void addSourceModification(SourceRange range);
StringRef const& getMainFileName() const { return mainFileName; }
// Is all code that could see `decl` defined in this TU? bool isAllRelevantCodeDefined(NamedDecl const * decl);
// Used internally by isAllRelevantCodeDefined:
RecordCompleteMap RecordsComplete_;
RecordCompleteMap MNCComplete_;
};
/** The Clang plugin class, just forwards to PluginHandler.
*/ class LibreOfficeAction
: public PluginASTAction
{ public: virtual std::unique_ptr<ASTConsumer> CreateASTConsumer( CompilerInstance& Compiler, StringRef InFile );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.