This revision was automatically updated to reflect the committed changes.
juliehockett marked an inline comment as done.
Closed by commit rL331905: [tools] Updating PPCallbacks::InclusionDirective
calls (authored by juliehockett, committed by ).
Herald added subscribers: llvm-commits, ilya-biryukov, klimek.
Changed prior to commit:
https://reviews.llvm.org/D46615?vs=145823&id=145972#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46615
Files:
clang-tools-extra/trunk/clang-move/ClangMove.cpp
clang-tools-extra/trunk/clang-tidy/llvm/IncludeOrderCheck.cpp
clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp
clang-tools-extra/trunk/clangd/ClangdUnit.cpp
clang-tools-extra/trunk/clangd/Headers.cpp
clang-tools-extra/trunk/modularize/CoverageChecker.cpp
clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h
Index: clang-tools-extra/trunk/clang-tidy/llvm/IncludeOrderCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/llvm/IncludeOrderCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/llvm/IncludeOrderCheck.cpp
@@ -28,7 +28,8 @@
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 @@
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};
Index: clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp
+++ clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp
@@ -25,7 +25,8 @@
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());
}
Index: clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
@@ -30,7 +30,8 @@
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 @@
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:
Index: clang-tools-extra/trunk/clangd/ClangdUnit.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/ClangdUnit.cpp
+++ clang-tools-extra/trunk/clangd/ClangdUnit.cpp
@@ -93,7 +93,8 @@
StringRef FileName, bool IsAngled,
CharSourceRange FilenameRange, const FileEntry *File,
StringRef SearchPath, StringRef RelativePath,
- const Module *Imported) override {
+ const Module *Imported,
+ SrcMgr::CharacteristicKind FileType) override {
auto SR = FilenameRange.getAsRange();
if (SR.isInvalid() || !File || File->tryGetRealPathName().empty())
return;
Index: clang-tools-extra/trunk/clangd/Headers.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/Headers.cpp
+++ clang-tools-extra/trunk/clangd/Headers.cpp
@@ -34,7 +34,8 @@
CharSourceRange /*FilenameRange*/,
const FileEntry *File, llvm::StringRef /*SearchPath*/,
llvm::StringRef /*RelativePath*/,
- const Module * /*Imported*/) override {
+ const Module * /*Imported*/,
+ SrcMgr::CharacteristicKind /*FileType*/) override {
WrittenHeaders.insert(
(IsAngled ? "<" + FileName + ">" : "\"" + FileName + "\"").str());
if (File != nullptr && !File->tryGetRealPathName().empty())
Index: clang-tools-extra/trunk/clang-move/ClangMove.cpp
===================================================================
--- clang-tools-extra/trunk/clang-move/ClangMove.cpp
+++ clang-tools-extra/trunk/clang-move/ClangMove.cpp
@@ -131,7 +131,8 @@
clang::CharSourceRange FilenameRange,
const clang::FileEntry * /*File*/,
StringRef SearchPath, StringRef /*RelativePath*/,
- const clang::Module * /*Imported*/) override {
+ const clang::Module * /*Imported*/,
+ SrcMgr::CharacteristicKind /*FileType*/) override {
if (const auto *FileEntry = SM.getFileEntryForID(SM.getFileID(HashLoc)))
MoveTool->addIncludes(FileName, IsAngled, SearchPath,
FileEntry->getName(), FilenameRange, SM);
Index: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
===================================================================
--- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
+++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
@@ -139,7 +139,7 @@
llvm::StringRef FileName, bool IsAngled,
clang::CharSourceRange FilenameRange, const clang::FileEntry *File,
llvm::StringRef SearchPath, llvm::StringRef RelativePath,
- const clang::Module *Imported) {
+ const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) {
beginCallback("InclusionDirective");
appendArgument("IncludeTok", IncludeTok);
appendFilePathArgument("FileName", FileName);
Index: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h
===================================================================
--- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h
+++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h
@@ -102,7 +102,8 @@
const clang::FileEntry *File,
llvm::StringRef SearchPath,
llvm::StringRef RelativePath,
- const clang::Module *Imported) override;
+ const clang::Module *Imported,
+ clang::SrcMgr::CharacteristicKind FileType) override;
void moduleImport(clang::SourceLocation ImportLoc, clang::ModuleIdPath Path,
const clang::Module *Imported) override;
void EndOfMainFile() override;
Index: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
===================================================================
--- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
+++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
@@ -750,7 +750,8 @@
const clang::FileEntry *File,
llvm::StringRef SearchPath,
llvm::StringRef RelativePath,
- const clang::Module *Imported) override;
+ const clang::Module *Imported,
+ clang::SrcMgr::CharacteristicKind FileType) override;
void FileChanged(clang::SourceLocation Loc,
clang::PPCallbacks::FileChangeReason Reason,
clang::SrcMgr::CharacteristicKind FileType,
@@ -1289,7 +1290,7 @@
llvm::StringRef FileName, bool IsAngled,
clang::CharSourceRange FilenameRange, const clang::FileEntry *File,
llvm::StringRef SearchPath, llvm::StringRef RelativePath,
- const clang::Module *Imported) {
+ const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) {
int DirectiveLine, DirectiveColumn;
std::string HeaderPath = getSourceLocationFile(PP, HashLoc);
getSourceLocationLineAndColumn(PP, HashLoc, DirectiveLine, DirectiveColumn);
Index: clang-tools-extra/trunk/modularize/CoverageChecker.cpp
===================================================================
--- clang-tools-extra/trunk/modularize/CoverageChecker.cpp
+++ clang-tools-extra/trunk/modularize/CoverageChecker.cpp
@@ -90,7 +90,8 @@
StringRef FileName, bool IsAngled,
CharSourceRange FilenameRange, const FileEntry *File,
StringRef SearchPath, StringRef RelativePath,
- const Module *Imported) override {
+ const Module *Imported,
+ SrcMgr::CharacteristicKind FileType) override {
Checker.collectUmbrellaHeaderHeader(File->getName());
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits