Commit 6bbca341 authored by Artem Dergachev's avatar Artem Dergachev
Browse files

[CFG] Add a test for a flaky crash in CFGBlock::getLastCondition().

Push the test separately ahead of time in order to find out whether
our Memory Sanitizer bots will be able to find the problem.

If not, I'll add a much more expensive test that repeats the current
test multiple times in order to show up on normal buildbots.
I really apologize for the potential temporary inconvenience!
I'll commit the fix as soon as I get the signal.

Differential Revision: https://reviews.llvm.org/D69962
parent 22a0edd0
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s

struct S {
  S();
  ~S();
};

bool bar(S);

// no-crash during diagnostic construction.
void foo() {
  int x;
  if (true && bar(S()))
    ++x; // expected-warning{{The expression is an uninitialized value. The computed value will also be garbage}}
}