[all-commits] [llvm/llvm-project] 205c05: Revert "[clang] Convert OptionalFileEntryRefDegrad...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Sun Dec 18 11:24:23 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 205c0589f918f95d2f2c586a01bea2716d73d603
      https://github.com/llvm/llvm-project/commit/205c0589f918f95d2f2c586a01bea2716d73d603
  Author: Krzysztof Parzyszek <kparzysz at quicinc.com>
  Date:   2022-12-18 (Sun, 18 Dec 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/ParsedAST.cpp
    M clang-tools-extra/clangd/index/IndexAction.cpp
    M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
    M clang-tools-extra/include-cleaner/lib/Record.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/Basic/FileEntry.h
    M clang/include/clang/Basic/FileManager.h
    M clang/include/clang/Basic/Module.h
    M clang/include/clang/Basic/SourceManager.h
    M clang/include/clang/Lex/DirectoryLookup.h
    M clang/include/clang/Lex/HeaderSearch.h
    M clang/include/clang/Lex/ModuleMap.h
    M clang/include/clang/Lex/PPCallbacks.h
    M clang/include/clang/Lex/PreprocessingRecord.h
    M clang/include/clang/Lex/Preprocessor.h
    M clang/include/clang/Serialization/ModuleManager.h
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/ARCMigrate/ObjCMT.cpp
    M clang/lib/Basic/FileManager.cpp
    M clang/lib/Basic/SourceManager.cpp
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/CodeGen/CGObjCGNU.cpp
    M clang/lib/CodeGen/MacroPPCallbacks.cpp
    M clang/lib/CodeGen/MacroPPCallbacks.h
    M clang/lib/Frontend/CompilerInstance.cpp
    M clang/lib/Frontend/DependencyFile.cpp
    M clang/lib/Frontend/DependencyGraph.cpp
    M clang/lib/Frontend/FrontendAction.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/Frontend/VerifyDiagnosticConsumer.cpp
    M clang/lib/Index/IndexingAction.cpp
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/lib/Lex/ModuleMap.cpp
    M clang/lib/Lex/PPCallbacks.cpp
    M clang/lib/Lex/PPDirectives.cpp
    M clang/lib/Lex/PPLexerChange.cpp
    M clang/lib/Lex/PPMacroExpansion.cpp
    M clang/lib/Lex/Pragma.cpp
    M clang/lib/Lex/PreprocessingRecord.cpp
    M clang/lib/Lex/Preprocessor.cpp
    M clang/lib/Sema/SemaModule.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ModuleManager.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/Basic/FileManagerTest.cpp
    M clang/unittests/Lex/PPCallbacksTest.cpp

  Log Message:
  -----------
  Revert "[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optional"

This reverts commit 8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.

The Optional*RefDegradesTo*EntryPtr types want to keep the same size as
the underlying type, which std::optional doesn't guarantee. For use with
llvm::Optional, they define their own storage class, and there is no way
to do that in std::optional.

On top of that, that commit broke builds with older GCCs, where
std::optional was not trivially copyable (static_assert in the clang
sources was failing).




More information about the All-commits mailing list