[all-commits] [llvm/llvm-project] a3d76b: [clang-tidy] fix match for binaryOperator in ExprM...

Julian Schmidt via All-commits all-commits at lists.llvm.org
Tue Nov 14 14:00:33 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3d76b3fa3f8641f515ea8bc5de0844e01f6d7cd
      https://github.com/llvm/llvm-project/commit/a3d76b3fa3f8641f515ea8bc5de0844e01f6d7cd
  Author: Julian Schmidt <44101708+5chmidti at users.noreply.github.com>
  Date:   2023-11-14 (Tue, 14 Nov 2023)

  Changed paths:
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-templates.cpp
    M clang/lib/Analysis/ExprMutationAnalyzer.cpp
    M clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp

  Log Message:
  -----------
  [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (#70559)

The `ExprMutationAnalyzer`s matcher of `binaryOperator`s
that contained the variable expr, were previously narrowing the
variable to be type dependent, when the `binaryOperator` should
have been narrowed as dependent.
The variable we are trying to find mutations for does
not need to be the dependent type, the other operand of
the `binaryOperator` could be dependent.

Fixes #57297




More information about the All-commits mailing list