[all-commits] [llvm/llvm-project] 1c0368: [clang][analysis] Fix flaky clang/test/Analysis/li...

Balazs Benics via All-commits all-commits at lists.llvm.org
Tue May 13 14:38:08 PDT 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c0368417f55417b8b08ae5c605231be096ef4bc
      https://github.com/llvm/llvm-project/commit/1c0368417f55417b8b08ae5c605231be096ef4bc
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2025-05-13 (Tue, 13 May 2025)

  Changed paths:
    M clang/lib/Analysis/LiveVariables.cpp
    M clang/test/Analysis/live-stmts.cpp

  Log Message:
  -----------
  [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (2nd attempt) (#127406)

In my previous attempt (#126913) of fixing the flaky case was on a good
track when I used the begin locations as a stable ordering. However, I
forgot to consider the case when the begin locations are the same among
the Exprs.

In an `EXPENSIVE_CHECKS` build, arrays are randomly shuffled prior to
sorting them. This exposed the flaky behavior much more often basically
breaking the "stability" of the vector - as it should.
Because of this, I had to revert the previous fix attempt in #127034.

To fix this, I use this time `Expr::getID` for a stable ID for an Expr.

Hopefully fixes #126619
Hopefully fixes #126804

(cherry picked from commit f378e52ed3c6f8da4973f97f1ef043c2eb0da721)



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