[clang] [Analyzer] support parenthesized list initialization (PR #148988)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 16 08:16:52 PDT 2025


================
@@ -1,13 +1,65 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++20 -verify %s
 
-int fooPR10616 (int qX ) {
+namespace GH10616 {
+int foo(int qX) {
   int a, c, d;
 
-  d = (qX-1);
-  while ( d != 0 ) {
-    d = c - (c/d) * d;
+  d = (qX - 1);
+  while (d != 0) {
+    d = c - (c / d) * d;
----------------
necto wrote:

This looks like an unrelated change. Having this change bundled here would hinder my investigation when I break a test case here because it would suggest it has something to do with parenthesized initialization, which it is not.

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


More information about the cfe-commits mailing list