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

kazutakahirata via All-commits all-commits at lists.llvm.org
Fri Dec 2 22:10:52 PST 2022


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

  Changed paths:
    M llvm/include/llvm/Testing/Support/Error.h
    M llvm/lib/Testing/Support/Annotations.cpp
    M llvm/unittests/ADT/APIntTest.cpp
    M llvm/unittests/ADT/IteratorTest.cpp
    M llvm/unittests/ADT/OptionalTest.cpp
    M llvm/unittests/Analysis/AliasAnalysisTest.cpp
    M llvm/unittests/Analysis/LoopInfoTest.cpp
    M llvm/unittests/Analysis/MemoryBuiltinsTest.cpp
    M llvm/unittests/Analysis/ScalarEvolutionTest.cpp
    M llvm/unittests/Analysis/ValueTrackingTest.cpp
    M llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
    M llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/GISelMITest.cpp
    M llvm/unittests/CodeGen/InstrRefLDVTest.cpp
    M llvm/unittests/CodeGen/LexicalScopesTest.cpp
    M llvm/unittests/CodeGen/MFCommon.inc
    M llvm/unittests/CodeGen/MachineInstrTest.cpp
    M llvm/unittests/CodeGen/PassManagerTest.cpp
    M llvm/unittests/CodeGen/SelectionDAGAddressAnalysisTest.cpp
    M llvm/unittests/CodeGen/TargetOptionsTest.cpp
    M llvm/unittests/CodeGen/TestAsmPrinter.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFLocationExpressionTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
    M llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
    M llvm/unittests/DebugInfo/Symbolizer/MarkupTest.cpp
    M llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
    M llvm/unittests/ExecutionEngine/Orc/JITTargetMachineBuilderTest.cpp
    M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
    M llvm/unittests/IR/AttributesTest.cpp
    M llvm/unittests/IR/CFGBuilder.cpp
    M llvm/unittests/IR/ConstantRangeTest.cpp
    M llvm/unittests/IR/ConstantsTest.cpp
    M llvm/unittests/IR/IRBuilderTest.cpp
    M llvm/unittests/IR/InstructionsTest.cpp
    M llvm/unittests/IR/MetadataTest.cpp
    M llvm/unittests/IR/PassBuilderCallbacksTest.cpp
    M llvm/unittests/IR/VerifierTest.cpp
    M llvm/unittests/MC/AMDGPU/DwarfRegMappings.cpp
    M llvm/unittests/MC/DwarfLineTableHeaders.cpp
    M llvm/unittests/MC/MCDisassemblerTest.cpp
    M llvm/unittests/MI/LiveIntervalTest.cpp
    M llvm/unittests/MIR/MachineMetadata.cpp
    M llvm/unittests/Object/ELFObjectFileTest.cpp
    M llvm/unittests/Object/MinidumpTest.cpp
    M llvm/unittests/Remarks/BitstreamRemarksSerializerTest.cpp
    M llvm/unittests/Remarks/YAMLRemarksParsingTest.cpp
    M llvm/unittests/Remarks/YAMLRemarksSerializerTest.cpp
    M llvm/unittests/Support/CheckedArithmeticTest.cpp
    M llvm/unittests/Support/ConvertUTFTest.cpp
    M llvm/unittests/Support/ErrorTest.cpp
    M llvm/unittests/Support/Host.cpp
    M llvm/unittests/Support/InstructionCostTest.cpp
    M llvm/unittests/Support/JSONTest.cpp
    M llvm/unittests/Support/MatchersTest.cpp
    M llvm/unittests/Support/NativeFormatTests.cpp
    M llvm/unittests/Support/Path.cpp
    M llvm/unittests/Support/ProgramTest.cpp
    M llvm/unittests/Support/SourceMgrTest.cpp
    M llvm/unittests/Support/VirtualFileSystemTest.cpp
    M llvm/unittests/Support/raw_ostream_test.cpp
    M llvm/unittests/Target/AArch64/InstSizes.cpp
    M llvm/unittests/Target/AArch64/MatrixRegisterAliasing.cpp
    M llvm/unittests/Target/AMDGPU/DwarfRegMappings.cpp
    M llvm/unittests/Target/ARM/InstSizes.cpp
    M llvm/unittests/Target/ARM/MachineInstrTest.cpp
    M llvm/unittests/Target/PowerPC/AIXRelocModelTest.cpp
    M llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp
    M llvm/unittests/Target/X86/MachineSizeOptsTest.cpp
    M llvm/unittests/Testing/Support/TempPathTest.cpp
    M llvm/unittests/Transforms/Utils/CloningTest.cpp
    M llvm/unittests/Transforms/Utils/ValueMapperTest.cpp
    M llvm/unittests/tools/llvm-mca/MCATestBase.h

  Log Message:
  -----------
  [llvm/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




More information about the All-commits mailing list