10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H 13 #include "../ClangTidy.h" 14 #include "llvm/ADT/SmallPtrSet.h" 30 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
34 void removeFromFoundDecls(
const Decl *D);
36 struct UsingDeclContext {
37 explicit UsingDeclContext(
const UsingDecl *FoundUsingDecl)
38 : FoundUsingDecl(FoundUsingDecl), IsUsed(
false) {}
42 llvm::SmallPtrSet<const Decl *, 4> UsingTargetDecls;
44 const UsingDecl *FoundUsingDecl;
46 CharSourceRange UsingDeclRange;
51 std::vector<UsingDeclContext> Contexts;
58 #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.
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.