[all-commits] [llvm/llvm-project] c3cc09: [AsmPrinter] Fix gcc -Wparentheses warning [NFC]

mikaelholmen via All-commits all-commits at lists.llvm.org
Wed Jan 17 23:38:14 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3cc09bdf8e83b86bd087e14b2dae34888422096
      https://github.com/llvm/llvm-project/commit/c3cc09bdf8e83b86bd087e14b2dae34888422096
  Author: Mikael Holmen <mikael.holmen at ericsson.com>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

  Log Message:
  -----------
  [AsmPrinter] Fix gcc -Wparentheses warning [NFC]

Without this gcc warned
 ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:3585:70: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  3584 |            ((&Current == &AccelDebugNames) &&
       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3585 |             (Unit.getUnitDie().getTag() != dwarf::DW_TAG_type_unit)) &&
       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  3586 |                "Kind is CU but TU is being processed.");
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:3589:70: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  3588 |            ((&Current == &AccelTypeUnitsDebugNames) &&
       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3589 |             (Unit.getUnitDie().getTag() == dwarf::DW_TAG_type_unit)) &&
       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  3590 |                "Kind is TU but CU is being processed.");
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the All-commits mailing list