[PATCH] D69962: [CFG] Fix a flaky crash in CFGBlock::getLastCondition().

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 18:17:53 PST 2019


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}}
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69962.230575.patch
Type: text/x-patch
Size: 513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191122/0777cc53/attachment.bin>


More information about the cfe-commits mailing list