9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H 12 #include "../ClangTidyCheck.h" 13 #include "llvm/ADT/SmallPtrSet.h" 29 void check(
const ast_matchers::MatchFinder::MatchResult &
Result)
override;
33 void removeFromFoundDecls(
const Decl *
D);
35 struct UsingDeclContext {
36 explicit UsingDeclContext(
const UsingDecl *FoundUsingDecl)
37 : FoundUsingDecl(FoundUsingDecl), IsUsed(
false) {}
41 llvm::SmallPtrSet<const Decl *, 4> UsingTargetDecls;
43 const UsingDecl *FoundUsingDecl;
45 CharSourceRange UsingDeclRange;
50 std::vector<UsingDeclContext> Contexts;
57 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
UnusedUsingDeclsCheck(StringRef Name, ClangTidyContext *Context)
Base class for all clang-tidy checks.
void onEndOfTranslationUnit() override
Finds unused using declarations.
static constexpr llvm::StringLiteral Name
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
llvm::Optional< llvm::Expected< tooling::AtomicChanges > > Result