[all-commits] [llvm/llvm-project] d79ad2: [clang][lex] NFCI: Use FileEntryRef in PPCallbacks...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Thu Apr 14 01:46:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d79ad2f1dbc2db63121620f55d6cfa915f2733ac
      https://github.com/llvm/llvm-project/commit/d79ad2f1dbc2db63121620f55d6cfa915f2733ac
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

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

  Log Message:
  -----------
  [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective()

This patch changes type of the `File` parameter in `PPCallbacks::InclusionDirective()` from `const FileEntry *` to `Optional<FileEntryRef>`.

With the API change in place, this patch then removes some uses of the deprecated `FileEntry::getName()` (e.g. in `DependencyGraph.cpp` and `ModuleDependencyCollector.cpp`).

Reviewed By: dexonsmith, bnbarham

Differential Revision: https://reviews.llvm.org/D123574




More information about the All-commits mailing list