forked from OSchip/llvm-project
Revert "[tools] Updating PPCallbacks::InclusionDirective calls"
This reverts commit r331905, since it's dependent on reverted r331905. llvm-svn: 331931
This commit is contained in:
parent
06af01bbc2
commit
4a43843532
|
@ -131,8 +131,7 @@ public:
|
|||
clang::CharSourceRange FilenameRange,
|
||||
const clang::FileEntry * /*File*/,
|
||||
StringRef SearchPath, StringRef /*RelativePath*/,
|
||||
const clang::Module * /*Imported*/,
|
||||
SrcMgr::CharacteristicKind /*FileType*/) override {
|
||||
const clang::Module * /*Imported*/) override {
|
||||
if (const auto *FileEntry = SM.getFileEntryForID(SM.getFileID(HashLoc)))
|
||||
MoveTool->addIncludes(FileName, IsAngled, SearchPath,
|
||||
FileEntry->getName(), FilenameRange, SM);
|
||||
|
|
|
@ -28,8 +28,7 @@ public:
|
|||
StringRef FileName, bool IsAngled,
|
||||
CharSourceRange FilenameRange, const FileEntry *File,
|
||||
StringRef SearchPath, StringRef RelativePath,
|
||||
const Module *Imported,
|
||||
SrcMgr::CharacteristicKind FileType) override;
|
||||
const Module *Imported) override;
|
||||
void EndOfMainFile() override;
|
||||
|
||||
private:
|
||||
|
@ -77,8 +76,7 @@ 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,
|
||||
SrcMgr::CharacteristicKind FileType) {
|
||||
StringRef SearchPath, StringRef RelativePath, const Module *Imported) {
|
||||
// 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};
|
||||
|
|
|
@ -30,8 +30,7 @@ public:
|
|||
StringRef FileName, bool IsAngled,
|
||||
CharSourceRange FilenameRange, const FileEntry *File,
|
||||
StringRef SearchPath, StringRef RelativePath,
|
||||
const Module *Imported,
|
||||
SrcMgr::CharacteristicKind FileType) override;
|
||||
const Module *Imported) override;
|
||||
|
||||
private:
|
||||
ClangTidyCheck &Check;
|
||||
|
@ -95,8 +94,7 @@ 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,
|
||||
SrcMgr::CharacteristicKind FileType) {
|
||||
StringRef SearchPath, StringRef RelativePath, const Module *Imported) {
|
||||
// FIXME: Take care of library symbols from the global namespace.
|
||||
//
|
||||
// Reasonable options for the check:
|
||||
|
|
|
@ -25,8 +25,7 @@ public:
|
|||
bool IsAngled, CharSourceRange FileNameRange,
|
||||
const FileEntry * /*IncludedFile*/,
|
||||
StringRef /*SearchPath*/, StringRef /*RelativePath*/,
|
||||
const Module * /*ImportedModule*/,
|
||||
SrcMgr::CharacteristicKind /*FileType*/) override {
|
||||
const Module * /*ImportedModule*/) override {
|
||||
Inserter->AddInclude(FileNameRef, IsAngled, HashLocation,
|
||||
IncludeToken.getEndLoc());
|
||||
}
|
||||
|
|
|
@ -93,8 +93,7 @@ public:
|
|||
StringRef FileName, bool IsAngled,
|
||||
CharSourceRange FilenameRange, const FileEntry *File,
|
||||
StringRef SearchPath, StringRef RelativePath,
|
||||
const Module *Imported,
|
||||
SrcMgr::CharacteristicKind FileType) override {
|
||||
const Module *Imported) override {
|
||||
auto SR = FilenameRange.getAsRange();
|
||||
if (SR.isInvalid() || !File || File->tryGetRealPathName().empty())
|
||||
return;
|
||||
|
|
|
@ -34,8 +34,7 @@ public:
|
|||
CharSourceRange /*FilenameRange*/,
|
||||
const FileEntry *File, llvm::StringRef /*SearchPath*/,
|
||||
llvm::StringRef /*RelativePath*/,
|
||||
const Module * /*Imported*/,
|
||||
SrcMgr::CharacteristicKind /*FileType*/) override {
|
||||
const Module * /*Imported*/) override {
|
||||
WrittenHeaders.insert(
|
||||
(IsAngled ? "<" + FileName + ">" : "\"" + FileName + "\"").str());
|
||||
if (File != nullptr && !File->tryGetRealPathName().empty())
|
||||
|
|
|
@ -90,8 +90,7 @@ public:
|
|||
StringRef FileName, bool IsAngled,
|
||||
CharSourceRange FilenameRange, const FileEntry *File,
|
||||
StringRef SearchPath, StringRef RelativePath,
|
||||
const Module *Imported,
|
||||
SrcMgr::CharacteristicKind FileType) override {
|
||||
const Module *Imported) override {
|
||||
Checker.collectUmbrellaHeaderHeader(File->getName());
|
||||
}
|
||||
|
||||
|
|
|
@ -750,8 +750,7 @@ public:
|
|||
const clang::FileEntry *File,
|
||||
llvm::StringRef SearchPath,
|
||||
llvm::StringRef RelativePath,
|
||||
const clang::Module *Imported,
|
||||
clang::SrcMgr::CharacteristicKind FileType) override;
|
||||
const clang::Module *Imported) override;
|
||||
void FileChanged(clang::SourceLocation Loc,
|
||||
clang::PPCallbacks::FileChangeReason Reason,
|
||||
clang::SrcMgr::CharacteristicKind FileType,
|
||||
|
@ -1290,7 +1289,7 @@ void PreprocessorCallbacks::InclusionDirective(
|
|||
llvm::StringRef FileName, bool IsAngled,
|
||||
clang::CharSourceRange FilenameRange, const clang::FileEntry *File,
|
||||
llvm::StringRef SearchPath, llvm::StringRef RelativePath,
|
||||
const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) {
|
||||
const clang::Module *Imported) {
|
||||
int DirectiveLine, DirectiveColumn;
|
||||
std::string HeaderPath = getSourceLocationFile(PP, HashLoc);
|
||||
getSourceLocationLineAndColumn(PP, HashLoc, DirectiveLine, DirectiveColumn);
|
||||
|
|
|
@ -139,7 +139,7 @@ void PPCallbacksTracker::InclusionDirective(
|
|||
llvm::StringRef FileName, bool IsAngled,
|
||||
clang::CharSourceRange FilenameRange, const clang::FileEntry *File,
|
||||
llvm::StringRef SearchPath, llvm::StringRef RelativePath,
|
||||
const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) {
|
||||
const clang::Module *Imported) {
|
||||
beginCallback("InclusionDirective");
|
||||
appendArgument("IncludeTok", IncludeTok);
|
||||
appendFilePathArgument("FileName", FileName);
|
||||
|
|
|
@ -102,8 +102,7 @@ public:
|
|||
const clang::FileEntry *File,
|
||||
llvm::StringRef SearchPath,
|
||||
llvm::StringRef RelativePath,
|
||||
const clang::Module *Imported,
|
||||
clang::SrcMgr::CharacteristicKind FileType) override;
|
||||
const clang::Module *Imported) override;
|
||||
void moduleImport(clang::SourceLocation ImportLoc, clang::ModuleIdPath Path,
|
||||
const clang::Module *Imported) override;
|
||||
void EndOfMainFile() override;
|
||||
|
|
Loading…
Reference in New Issue