MisleadingBidirectional.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. //===--- MisleadingBidirectionalCheck.h - clang-tidy ------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISLEADINGBIDIRECTIONALCHECK_H
  9. #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISLEADINGBIDIRECTIONALCHECK_H
  10. #include "../ClangTidyCheck.h"
  11. namespace clang::tidy::misc {
  12. class MisleadingBidirectionalCheck : public ClangTidyCheck {
  13. public:
  14. MisleadingBidirectionalCheck(StringRef Name, ClangTidyContext *Context);
  15. ~MisleadingBidirectionalCheck();
  16. void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
  17. Preprocessor *ModuleExpanderPP) override;
  18. void registerMatchers(ast_matchers::MatchFinder *Finder) override;
  19. void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
  20. private:
  21. class MisleadingBidirectionalHandler;
  22. std::unique_ptr<MisleadingBidirectionalHandler> Handler;
  23. };
  24. } // namespace clang::tidy::misc
  25. #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISLEADINGBIDIRECTIONALCHECK_H