2014-05-20 00:39:08 +08:00
|
|
|
//===--- IncludeOrderCheck.h - clang-tidy -----------------------*- C++ -*-===//
|
2013-07-29 16:19:24 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2013-07-29 16:19:24 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2019-05-11 02:27:09 +08:00
|
|
|
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_INCLUDEORDERCHECK_H
|
|
|
|
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_INCLUDEORDERCHECK_H
|
2013-07-29 16:19:24 +08:00
|
|
|
|
2019-03-25 20:38:26 +08:00
|
|
|
#include "../ClangTidyCheck.h"
|
2013-07-29 16:19:24 +08:00
|
|
|
|
|
|
|
namespace clang {
|
|
|
|
namespace tidy {
|
2019-05-11 02:27:09 +08:00
|
|
|
namespace llvm_check {
|
2013-07-29 16:19:24 +08:00
|
|
|
|
2015-08-28 02:01:58 +08:00
|
|
|
/// Checks the correct order of `#includes`.
|
2013-07-29 16:19:24 +08:00
|
|
|
///
|
2015-08-28 02:01:58 +08:00
|
|
|
/// See http://llvm.org/docs/CodingStandards.html#include-style
|
2013-07-29 16:19:24 +08:00
|
|
|
class IncludeOrderCheck : public ClangTidyCheck {
|
|
|
|
public:
|
2014-09-12 16:53:36 +08:00
|
|
|
IncludeOrderCheck(StringRef Name, ClangTidyContext *Context)
|
|
|
|
: ClangTidyCheck(Name, Context) {}
|
2019-03-23 02:58:12 +08:00
|
|
|
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
|
|
|
|
Preprocessor *ModuleExpanderPP) override;
|
2013-07-29 16:19:24 +08:00
|
|
|
};
|
|
|
|
|
2019-05-11 02:27:09 +08:00
|
|
|
} // namespace llvm_check
|
2013-07-29 16:19:24 +08:00
|
|
|
} // namespace tidy
|
|
|
|
} // namespace clang
|
|
|
|
|
2019-05-11 02:27:09 +08:00
|
|
|
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_INCLUDEORDERCHECK_H
|