[all-commits] [llvm/llvm-project] 03f616: [llvm] Compare std::optional<T> to values directly...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sun Jun 8 22:38:20 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03f616eb3acf1ae5a219ea247d9efe3cbfd41b59
      https://github.com/llvm/llvm-project/commit/03f616eb3acf1ae5a219ea247d9efe3cbfd41b59
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-06-08 (Sun, 08 Jun 2025)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
    M llvm/lib/ObjCopy/MachO/MachOObject.h
    M llvm/lib/Object/ELFObjectFile.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/lib/Transforms/Utils/Debugify.cpp
    M llvm/tools/llvm-cov/SourceCoverageViewText.cpp
    M llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
    M llvm/unittests/Support/ARMAttributeParser.cpp

  Log Message:
  -----------
  [llvm] Compare std::optional<T> to values directly (NFC) (#143340)

This patch transforms:

  X && *X == Y

to:

  X == Y

where X is of std::optional<T>, and Y is of T or similar.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list