#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/Attr.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/LexDiagnostic.h"
usingnamespaceclang;
namespace {
static bool EnableAnnotate = …;
static bool HandledDecl = …;
class AnnotateFunctionsConsumer : public ASTConsumer { … };
class AnnotateFunctionsAction : public PluginASTAction { … };
class PragmaAnnotateHandler : public PragmaHandler { … };
}
static FrontendPluginRegistry::Add<AnnotateFunctionsAction>
X("annotate-fns", "annotate functions");
static PragmaHandlerRegistry::Add<PragmaAnnotateHandler>
Y("enable_annotate","enable annotation");