This revision was automatically updated to reflect the committed changes. Closed by commit rG6bbca3411b38: [CFG] Add a test for a flaky crash in CFGBlock::getLastCondition(). (authored by dergachev.a).
Changed prior to commit: https://reviews.llvm.org/D69962?vs=228292&id=230575#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69962/new/ https://reviews.llvm.org/D69962 Files: clang/test/Analysis/a_flaky_crash.cpp Index: clang/test/Analysis/a_flaky_crash.cpp =================================================================== --- /dev/null +++ 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}} +}
Index: clang/test/Analysis/a_flaky_crash.cpp =================================================================== --- /dev/null +++ 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