#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/Frontend/FrontendPluginRegistry.h"
usingnamespaceclang;
namespace {
class AlwaysBeforeConsumer : public ASTConsumer { … };
class AlwaysBeforeAction : public PluginASTAction { … };
class AlwaysAfterConsumer : public ASTConsumer { … };
class AlwaysAfterAction : public PluginASTAction { … };
class CmdAfterConsumer : public ASTConsumer { … };
class CmdAfterAction : public PluginASTAction { … };
class CmdBeforeConsumer : public ASTConsumer { … };
class CmdBeforeAction : public PluginASTAction { … };
}
static FrontendPluginRegistry::Add<CmdBeforeAction> X1("cmd-before", "");
static FrontendPluginRegistry::Add<CmdAfterAction> X2("cmd-after", "");
static FrontendPluginRegistry::Add<AlwaysBeforeAction> X3("always-before", "");
static FrontendPluginRegistry::Add<AlwaysAfterAction> X4("always-after", "");