Author: Artem Dergachev Date: 2019-11-21T18:11:15-08:00 New Revision: 6bbca3411b3861904c3b302f61d59efa14d4d0b9
URL: https://github.com/llvm/llvm-project/commit/6bbca3411b3861904c3b302f61d59efa14d4d0b9 DIFF: https://github.com/llvm/llvm-project/commit/6bbca3411b3861904c3b302f61d59efa14d4d0b9.diff LOG: [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 Added: clang/test/Analysis/a_flaky_crash.cpp Modified: Removed: ################################################################################ diff --git a/clang/test/Analysis/a_flaky_crash.cpp b/clang/test/Analysis/a_flaky_crash.cpp new file mode 100644 index 000000000000..e0bcc0057467 --- /dev/null +++ b/clang/test/Analysis/a_flaky_crash.cpp @@ -0,0 +1,15 @@ +// 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}} +} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits