summaryrefslogtreecommitdiffstats
path: root/clang-tidy/llvm/IncludeOrderCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/llvm/IncludeOrderCheck.cpp')
-rw-r--r--clang-tidy/llvm/IncludeOrderCheck.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tidy/llvm/IncludeOrderCheck.cpp
index f1fdb39c..9c3ab0b7 100644
--- a/clang-tidy/llvm/IncludeOrderCheck.cpp
+++ b/clang-tidy/llvm/IncludeOrderCheck.cpp
@@ -1,9 +1,8 @@
//===--- IncludeOrderCheck.cpp - clang-tidy -------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// 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
//
//===----------------------------------------------------------------------===//
@@ -21,7 +20,8 @@ namespace llvm {
namespace {
class IncludeOrderPPCallbacks : public PPCallbacks {
public:
- explicit IncludeOrderPPCallbacks(ClangTidyCheck &Check, SourceManager &SM)
+ explicit IncludeOrderPPCallbacks(ClangTidyCheck &Check,
+ const SourceManager &SM)
: LookForMainModule(true), Check(Check), SM(SM) {}
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
@@ -46,14 +46,14 @@ private:
bool LookForMainModule;
ClangTidyCheck &Check;
- SourceManager &SM;
+ const SourceManager &SM;
};
} // namespace
-void IncludeOrderCheck::registerPPCallbacks(CompilerInstance &Compiler) {
- Compiler.getPreprocessor().addPPCallbacks(
- ::llvm::make_unique<IncludeOrderPPCallbacks>(
- *this, Compiler.getSourceManager()));
+void IncludeOrderCheck::registerPPCallbacks(const SourceManager &SM,
+ Preprocessor *PP,
+ Preprocessor *ModuleExpanderPP) {
+ PP->addPPCallbacks(::llvm::make_unique<IncludeOrderPPCallbacks>(*this, SM));
}
static int getPriority(StringRef Filename, bool IsAngled, bool IsMainModule) {