[all-commits] [llvm/llvm-project] 4f265c: [clang-tidy] Fix `altera-id-dependent-backward-bra...

Daniil Dudkin via All-commits all-commits at lists.llvm.org
Sat Jun 6 12:26:29 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f265ce6730f6b109783a56f4c9251ed537c08c4
      https://github.com/llvm/llvm-project/commit/4f265ce6730f6b109783a56f4c9251ed537c08c4
  Author: Daniil Dudkin <unterumarmung at yandex.ru>
  Date:   2026-06-06 (Sat, 06 Jun 2026)

  Changed paths:
    M clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp
    M clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/altera/id-dependent-backward-branch.cpp

  Log Message:
  -----------
  [clang-tidy] Fix `altera-id-dependent-backward-branch` false positives (#200660)

The check unconditionally marked the LHS of any assignment from a
variable or field as ID-dependent. As a result, ordinary assignments
like `x = y` or `i += chunk_size` could trigger false positives in later
loop conditions.

Only propagate ID-dependency when the RHS variable or field is already
known ID-dependent.

Based on the fix by @yeputons, with helper renaming and extra tests for
ordinary assignments, fields, macros, aliases, cv/ref cases, lambdas,
templates, concepts, and the #53777 range-for case.

Fix #52790
Fix #53777

Assisted by Codex.



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