[all-commits] [llvm/llvm-project] 71c6a3: [AMDGPU][NFC] Remove redundant condition

Balogh, Ádám via All-commits all-commits at lists.llvm.org
Wed Jul 1 00:02:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 71c6a36018dd3e3a8f709d4a6f81a6d3ce56d780
      https://github.com/llvm/llvm-project/commit/71c6a36018dd3e3a8f709d4a6f81a6d3ce56d780
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

  Log Message:
  -----------
  [AMDGPU][NFC] Remove redundant condition

Condition `LiteralCount` is checked both in an outer and in an inner
`if` statement in `SIInstrInfo::verifyInstruction()`. This patch removes
the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

Differential Revision: https://reviews.llvm.org/D82555


  Commit: ec5ba353fab79d2201f63485117682756da31d46
      https://github.com/llvm/llvm-project/commit/ec5ba353fab79d2201f63485117682756da31d46
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp

  Log Message:
  -----------
  [Hexagon][NFC] Remove redundant condition

Condition `secondReg` is checked both in an outer and in an inner `if`
statement in static function `canCompareBeNewValueJump()` in file
`HexagonNewValueJump.cpp`. This patch removes the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

Differential Revision: https://reviews.llvm.org/D82556


  Commit: 1b2d2d70e1ec161878a78d880fb8972550b88185
      https://github.com/llvm/llvm-project/commit/1b2d2d70e1ec161878a78d880fb8972550b88185
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
    M lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
    M lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp

  Log Message:
  -----------
  [LLDB][NFC] Remove redundant condition

Condition `auto_advance_pc` is checked both in an outer and in an
inner `if` statement in `EmulateInstructionARM::EvaluateInstruction()`,
`EmulateInstructionARM64::EvaluateInstruction()` and
`EmulateInstructionPPC64::EvaluateInstruction()`. This patch removes the
redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

Differential Revision: https://reviews.llvm.org/D82558


  Commit: ff2d09148c91784c35b43c52f14b1501f38dd4c5
      https://github.com/llvm/llvm-project/commit/ff2d09148c91784c35b43c52f14b1501f38dd4c5
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

  Log Message:
  -----------
  [LLDB][Clang Integration][NFC] Remove redundant condition

Condition `omit_empty_base_classes` is checked both in an outer and
in an inner `if` statement in `TypeSystemClang::GetNumBaseClasses()`.
This patch removes the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

Differential Revision: https://reviews.llvm.org/D82559


  Commit: 40c50bdee443dd48424ac7d724ced8874c40ee33
      https://github.com/llvm/llvm-project/commit/40c50bdee443dd48424ac7d724ced8874c40ee33
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M clang/lib/Sema/SemaType.cpp

  Log Message:
  -----------
  [Sema][NFC] Remove Redundant Condition

Condition `TypeQuals` is checked both in an outer and in an inner `if`
statement in static function `ConvertDeclSpecToType()` in file
`SemaType.cpp`. This patch removes the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

Differential Revision: https://reviews.llvm.org/D82563


  Commit: 4da65c2920b68a1cf47054a7d655cc2a19a4aa28
      https://github.com/llvm/llvm-project/commit/4da65c2920b68a1cf47054a7d655cc2a19a4aa28
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
    A clang-tools-extra/clang-tidy/utils/Aliasing.cpp
    A clang-tools-extra/clang-tidy/utils/Aliasing.h
    M clang-tools-extra/clang-tidy/utils/CMakeLists.txt

  Log Message:
  -----------
  [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`

Function `hasPtrOrReferenceInfFunc()` of `bugprone-infinite-loop` is a
generic function which could be reused in another checks. This patch
moves this function into a newly created utility module.

Differential Revision: https://reviews.llvm.org/D81396


  Commit: ea563daae5232a03e08e43e68da813f76548f36a
      https://github.com/llvm/llvm-project/commit/ea563daae5232a03e08e43e68da813f76548f36a
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
    M clang/test/Analysis/iterator-modeling.cpp

  Log Message:
  -----------
  [Analyzer] Fix errors in iterator modeling

There is major a bug found in iterator modeling: upon adding a value
to or subtracting a value from an iterator the position of the original
iterator is also changed beside the result. This patch fixes this bug.

To catch such bugs in the future we also changed the tests to look for
regular expressions including an end-of-line symbol (`$`) so we can
prevent false matches where only the tested prefix matches.

Another minor bug is that when printing the state, all the iterator
positions are printed in a single line. This patch also fixes this.

Differential Revision: https://reviews.llvm.org/D82385


  Commit: 9e63b190af76c798b06b1e3b75216abfdeb1bce3
      https://github.com/llvm/llvm-project/commit/9e63b190af76c798b06b1e3b75216abfdeb1bce3
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/InvalidatedIteratorChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/Iterator.cpp
    M clang/lib/StaticAnalyzer/Checkers/Iterator.h
    M clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/IteratorRangeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MismatchedIteratorChecker.cpp
    M clang/test/Analysis/invalidated-iterator.cpp
    M clang/test/Analysis/iterator-modeling.cpp
    M clang/test/Analysis/iterator-range.cpp
    M clang/test/Analysis/mismatched-iterator.cpp

  Log Message:
  -----------
  [Analyzer] Handle pointer implemented as iterators in iterator checkers

Iterators are an abstraction of pointers and in some data structures
iterators may be implemented by pointers. This patch adds support for
iterators implemented as pointers in all the iterator checkers
(including iterator modeling).

Differential Revision: https://reviews.llvm.org/D82185


Compare: https://github.com/llvm/llvm-project/compare/7f6bc84a97f6...9e63b190af76


More information about the All-commits mailing list