[clang] [SSAF][Extractor] Make hard errors in PointerFlow and UnsafeBufferUsage Extractors quiet (PR #201953)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 02:02:38 PDT 2026


================
@@ -1126,4 +1126,47 @@ TEST_F(PointerFlowTest, NestedLambdaAssign) {
   ASSERT_NE(Sum, nullptr);
   EXPECT_EQ(*Sum, makeEdges(__LINE__, {{{"y", 1U}, {"x", 1U}}}));
 }
+
+//////////////////////////////////////////////////////////////
+//          Robustness Tests (No Crash Tests)               //
+//////////////////////////////////////////////////////////////
+
+TEST_F(PointerFlowTest, StructuredBindingWithPointers) {
+  StringRef Code = R"cpp(
+    void foo() {
+      int *a[2];
+      auto [ptr1, ptr2] = a;
+      ptr1[5];
+      ptr2[3];
+    }
+  )cpp";
+
+  // BindingDecl may not be fully supported, but should not crash
----------------
steakhal wrote:

In llvm, comments should be punctuated.
https://llvm.org/docs/CodingStandards.html#commenting

https://github.com/llvm/llvm-project/pull/201953


More information about the cfe-commits mailing list