summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy
diff options
context:
space:
mode:
authorJulie Hockett <juliehockett@google.com>2018-05-09 18:27:37 +0000
committerJulie Hockett <juliehockett@google.com>2018-05-09 18:27:37 +0000
commit4e548fe06f300d3c9e013bd12be61e6a3859d9a3 (patch)
tree3f98e71255036ca3574c6b41febbea0e4e3eae44 /clang-tools-extra/clang-tidy
parent36d94ab8f0123022c460980e31d4ad331ca7eb78 (diff)
downloadbcm5719-llvm-4e548fe06f300d3c9e013bd12be61e6a3859d9a3.tar.gz
bcm5719-llvm-4e548fe06f300d3c9e013bd12be61e6a3859d9a3.zip
[tools] Updating PPCallbacks::InclusionDirective calls
[revision] added SrcMgr::CharacteristicKind to the InclusionDirective callback, this revision updates instances of it in clang-tools-extra. Differential Revision: https://reviews.llvm.org/D46615 llvm-svn: 331905
Diffstat (limited to 'clang-tools-extra/clang-tidy')
-rw-r--r--clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp3
3 files changed, 10 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
index c277a45d2a0..f1fdb39c263 100644
--- a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
+++ b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
@@ -28,7 +28,8 @@ public:
StringRef FileName, bool IsAngled,
CharSourceRange FilenameRange, const FileEntry *File,
StringRef SearchPath, StringRef RelativePath,
- const Module *Imported) override;
+ const Module *Imported,
+ SrcMgr::CharacteristicKind FileType) override;
void EndOfMainFile() override;
private:
@@ -76,7 +77,8 @@ static int getPriority(StringRef Filename, bool IsAngled, bool IsMainModule) {
void IncludeOrderPPCallbacks::InclusionDirective(
SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName,
bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File,
- StringRef SearchPath, StringRef RelativePath, const Module *Imported) {
+ StringRef SearchPath, StringRef RelativePath, const Module *Imported,
+ SrcMgr::CharacteristicKind FileType) {
// We recognize the first include as a special main module header and want
// to leave it in the top position.
IncludeDirective ID = {HashLoc, FilenameRange, FileName, IsAngled, false};
diff --git a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
index ea5943e97a0..1ff3f898840 100644
--- a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
@@ -30,7 +30,8 @@ public:
StringRef FileName, bool IsAngled,
CharSourceRange FilenameRange, const FileEntry *File,
StringRef SearchPath, StringRef RelativePath,
- const Module *Imported) override;
+ const Module *Imported,
+ SrcMgr::CharacteristicKind FileType) override;
private:
ClangTidyCheck &Check;
@@ -94,7 +95,8 @@ IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(ClangTidyCheck &Check,
void IncludeModernizePPCallbacks::InclusionDirective(
SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName,
bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File,
- StringRef SearchPath, StringRef RelativePath, const Module *Imported) {
+ StringRef SearchPath, StringRef RelativePath, const Module *Imported,
+ SrcMgr::CharacteristicKind FileType) {
// FIXME: Take care of library symbols from the global namespace.
//
// Reasonable options for the check:
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp b/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
index 9fc7f52139d..64e4213c52b 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
+++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
@@ -25,7 +25,8 @@ public:
bool IsAngled, CharSourceRange FileNameRange,
const FileEntry * /*IncludedFile*/,
StringRef /*SearchPath*/, StringRef /*RelativePath*/,
- const Module * /*ImportedModule*/) override {
+ const Module * /*ImportedModule*/,
+ SrcMgr::CharacteristicKind /*FileType*/) override {
Inserter->AddInclude(FileNameRef, IsAngled, HashLocation,
IncludeToken.getEndLoc());
}
OpenPOWER on IntegriCloud