IncludeOrderCheck.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. //===--- IncludeOrderCheck.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_LLVM_INCLUDEORDERCHECK_H
  9. #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_INCLUDEORDERCHECK_H
  10. #include "../ClangTidyCheck.h"
  11. namespace clang::tidy::llvm_check {
  12. /// Checks the correct order of `#includes`.
  13. ///
  14. /// See http://llvm.org/docs/CodingStandards.html#include-style
  15. class IncludeOrderCheck : public ClangTidyCheck {
  16. public:
  17. IncludeOrderCheck(StringRef Name, ClangTidyContext *Context)
  18. : ClangTidyCheck(Name, Context) {}
  19. void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
  20. Preprocessor *ModuleExpanderPP) override;
  21. };
  22. } // namespace clang::tidy::llvm_check
  23. #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_INCLUDEORDERCHECK_H