summaryrefslogtreecommitdiffstats
path: root/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp')
-rw-r--r--clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp b/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
index 9fbb1219..28fccfdb 100644
--- a/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
+++ b/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
@@ -1,9 +1,8 @@
//===--- ProBoundsConstantArrayIndexCheck.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
//
//===----------------------------------------------------------------------===//
@@ -32,13 +31,13 @@ void ProBoundsConstantArrayIndexCheck::storeOptions(
}
void ProBoundsConstantArrayIndexCheck::registerPPCallbacks(
- CompilerInstance &Compiler) {
+ const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
if (!getLangOpts().CPlusPlus)
return;
- Inserter.reset(new utils::IncludeInserter(
- Compiler.getSourceManager(), Compiler.getLangOpts(), IncludeStyle));
- Compiler.getPreprocessor().addPPCallbacks(Inserter->CreatePPCallbacks());
+ Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ IncludeStyle);
+ PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
void ProBoundsConstantArrayIndexCheck::registerMatchers(MatchFinder *Finder) {