[all-commits] [llvm/llvm-project] 558315: [LLDB] Remove the redundent 'properties' variable ...

Shivam Gupta via All-commits all-commits at lists.llvm.org
Fri Jul 26 18:36:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 558315a0ea8cae8613c3a0061bc6cbe50c5b392f
      https://github.com/llvm/llvm-project/commit/558315a0ea8cae8613c3a0061bc6cbe50c5b392f
  Author: Shivam Gupta <shivam98.tkg at gmail.com>
  Date:   2024-07-27 (Sat, 27 Jul 2024)

  Changed paths:
    M lldb/source/Commands/CommandObjectTarget.cpp

  Log Message:
  -----------
  [LLDB] Remove the redundent 'properties' variable (#95675)

This is described in (N3) https://pvs-studio.com/en/blog/posts/cpp/1126/

Warning message -
V547 Expression 'properties ++ > 0' is always false.
CommandObjectTarget.cpp:100

I could not understand it properly but the properties++ operation is
performed twice when the target architecture is valid.
First increment seems unnecessary since it is always false '0>0'.

---------

Co-authored-by: xgupta <shivma98.tkg at gmail.com>



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