[PATCH] D123574: [clang] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 00:22:52 PDT 2022


jansvoboda11 created this revision.
jansvoboda11 added reviewers: dexonsmith, bnbarham.
Herald added subscribers: carlosgalvezp, usaxena95, shchenz, kadircet, arphaman, kbarton, nemanjai.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.

This patch changes type of the `File` parameter in `PPCallbacks::InclusionDirective` from `const FileEntry *` to `Optional<FileEntryRef>`. This makes it possible to remove some uses of the deprecated `FileEntry::getName()` (e.g. in `DependencyGraph.cpp`).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123574

Files:
  clang-tools-extra/clang-move/Move.cpp
  clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
  clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h
  clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp
  clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
  clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp
  clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
  clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
  clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.cpp
  clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.h
  clang-tools-extra/clang-tidy/readability/DuplicateIncludeCheck.cpp
  clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
  clang-tools-extra/clangd/Headers.cpp
  clang-tools-extra/clangd/Headers.h
  clang-tools-extra/clangd/ParsedAST.cpp
  clang-tools-extra/clangd/index/IndexAction.cpp
  clang-tools-extra/clangd/unittests/HeadersTests.cpp
  clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
  clang-tools-extra/modularize/CoverageChecker.cpp
  clang-tools-extra/modularize/PreprocessorTracker.cpp
  clang-tools-extra/pp-trace/PPCallbacksTracker.cpp
  clang-tools-extra/pp-trace/PPCallbacksTracker.h
  clang/include/clang/Lex/PPCallbacks.h
  clang/include/clang/Lex/PreprocessingRecord.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/CodeGen/MacroPPCallbacks.cpp
  clang/lib/CodeGen/MacroPPCallbacks.h
  clang/lib/Frontend/DependencyFile.cpp
  clang/lib/Frontend/DependencyGraph.cpp
  clang/lib/Frontend/ModuleDependencyCollector.cpp
  clang/lib/Frontend/PrecompiledPreamble.cpp
  clang/lib/Frontend/PrintPreprocessedOutput.cpp
  clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
  clang/lib/Lex/PPDirectives.cpp
  clang/lib/Lex/PreprocessingRecord.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
  clang/tools/libclang/CIndex.cpp
  clang/tools/libclang/CXIndexDataConsumer.cpp
  clang/tools/libclang/CXIndexDataConsumer.h
  clang/tools/libclang/Indexing.cpp
  clang/unittests/Lex/PPCallbacksTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123574.422133.patch
Type: text/x-patch
Size: 53152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220412/1dc64ca4/attachment-0001.bin>


More information about the cfe-commits mailing list