[all-commits] [llvm/llvm-project] a41fbb: [clang/unittests] Use std::nullopt instead of None...

kazutakahirata via All-commits all-commits at lists.llvm.org
Sat Dec 3 12:14:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a41fbb1fc2126e9791fd0f159f21935f6c2f93c4
      https://github.com/llvm/llvm-project/commit/a41fbb1fc2126e9791fd0f159f21935f6c2f93c4
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-03 (Sat, 03 Dec 2022)

  Changed paths:
    M clang/unittests/AST/ASTImporterTest.cpp
    M clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
    M clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
    M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
    M clang/unittests/Basic/DarwinSDKInfoTest.cpp
    M clang/unittests/Basic/FileEntryTest.cpp
    M clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp
    M clang/unittests/Frontend/ASTUnitTest.cpp
    M clang/unittests/Lex/HeaderSearchTest.cpp
    M clang/unittests/Serialization/SourceLocationEncodingTest.cpp
    M clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp
    M clang/unittests/Tooling/ASTSelectionTest.cpp
    M clang/unittests/Tooling/HeaderAnalysisTest.cpp
    M clang/unittests/Tooling/SourceCodeBuildersTest.cpp
    M clang/unittests/Tooling/StandardLibraryTest.cpp
    M clang/unittests/Tooling/StencilTest.cpp
    M clang/unittests/Tooling/Syntax/TokensTest.cpp
    M clang/unittests/Tooling/TransformerTest.cpp

  Log Message:
  -----------
  [clang/unittests] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


  Commit: 9a41739565d9f7ce94da5e7d83947ead73d9bd54
      https://github.com/llvm/llvm-project/commit/9a41739565d9f7ce94da5e7d83947ead73d9bd54
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-03 (Sat, 03 Dec 2022)

  Changed paths:
    M flang/include/flang/Lower/AbstractConverter.h
    M flang/include/flang/Lower/BoxAnalyzer.h
    M flang/include/flang/Lower/ComponentPath.h
    M flang/include/flang/Lower/IterationSpace.h
    M flang/include/flang/Optimizer/Builder/FIRBuilder.h
    M flang/include/flang/Optimizer/Support/KindMapping.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/Lower/Allocatable.cpp
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/CallInterface.cpp
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Lower/ConvertConstant.cpp
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/lib/Lower/ConvertExprToHLFIR.cpp
    M flang/lib/Lower/ConvertVariable.cpp
    M flang/lib/Lower/HostAssociations.cpp
    M flang/lib/Lower/IO.cpp
    M flang/lib/Lower/IterationSpace.cpp
    M flang/lib/Lower/Mangler.cpp
    M flang/lib/Lower/Runtime.cpp
    M flang/lib/Lower/SymbolMap.cpp
    M flang/lib/Lower/VectorSubscripts.cpp
    M flang/lib/Optimizer/Builder/Character.cpp
    M flang/lib/Optimizer/Builder/FIRBuilder.cpp
    M flang/lib/Optimizer/Builder/LowLevelIntrinsics.cpp
    M flang/lib/Optimizer/Builder/MutableBox.cpp
    M flang/lib/Optimizer/Builder/Runtime/Stop.cpp
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
    M flang/lib/Optimizer/CodeGen/TypeConverter.h
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    M flang/lib/Optimizer/Transforms/ControlFlowConverter.cpp
    M flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
    M flang/tools/f18-parse-demo/f18-parse-demo.cpp

  Log Message:
  -----------
  [flang] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


Compare: https://github.com/llvm/llvm-project/compare/ab672e91737d...9a41739565d9


More information about the All-commits mailing list