#include "NamespaceAliaser.h"
#include "ASTUtils.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Lex/Lexer.h"
#include <optional>
namespace clang::tidy::utils {
usingnamespaceast_matchers;
NamespaceAliaser::NamespaceAliaser(const SourceManager &SourceMgr)
: … { … }
AST_MATCHER_P(NamespaceAliasDecl, hasTargetNamespace,
ast_matchers::internal::Matcher<NamespaceDecl>, innerMatcher) { … }
std::optional<FixItHint>
NamespaceAliaser::createAlias(ASTContext &Context, const Stmt &Statement,
StringRef Namespace,
const std::vector<std::string> &Abbreviations) { … }
std::string NamespaceAliaser::getNamespaceName(ASTContext &Context,
const Stmt &Statement,
StringRef Namespace) const { … }
}