================
@@ -0,0 +1,15 @@
+// RUN: %clang_analyze_cc1 -std=c++23 -analyzer-checker=cplusplus -verify %s
+// expected-no-diagnostics
+
+template <int ...args>
+bool issue151529()
+{
+  [[assume (((args >= 0) && ...))]];
+  return ((args >= 0) && ...);
+}
+
+int main() {
+    issue151529();
+    [[assume((true))]]; // crash
+    return 0;
+}
----------------
steakhal wrote:

```suggestion
template <int ...args>
bool issue151529() {
  [[assume((true))]]; // no-crash
  [[assume(((args >= 0) && ...))]]; // no-crash
  return ((args >= 0) && ...);
}
void instantiate_issue151529() {
  issue151529();
}
```

https://github.com/llvm/llvm-project/pull/151682
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to