[clang] [clang][analyzer] Add OpaqueSTLFunctionsModeling (PR #178910)

Endre Fülöp via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 3 01:15:57 PST 2026


================
@@ -0,0 +1,26 @@
+// RUN: %clang --analyze -Xclang -verify %s
+//
+// RUN: %clang --analyze -Xclang -analyzer-dump-egraph=%t.dot -std=c++11 %s
+// RUN: cat %t.dot | FileCheck %s
+
+#include "../Inputs/system-header-simulator-cxx-std-suppression.h"
+
+// expected-no-diagnostics
+
+void test_sort() {
+  int arr[5];
+  std::sort(arr, arr + 5); // no-warning
+  // CHECK: \"tag\": \"apiModeling.OpaqueSTLFunctionsModeling
+}
+
+void test_stable_sort() {
+  int arr[5];
----------------
gamesh411 wrote:

The array is now correctly initialized.

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


More information about the cfe-commits mailing list