@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
}
}
+// Loop over the parameters to see if any of the size expressions contains
+// a DeclRefExpr which refers to a variable from an outer scope that is
+//
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
}
}
+// Loop over the parameters to see if any of the size expressions contains
+// a DeclRefExpr which refers to a variable from an outer scope that is
+//
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
}
}
+// Loop over the parameters to see if any of the size expressions contains
+// a DeclRefExpr which refers to a variable from an outer scope that is
+//
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
}
}
+// Loop over the parameters to see if any of the size expressions contains
+// a DeclRefExpr which refers to a variable from an outer scope that is
+//
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
}
}
+// Loop over the parameters to see if any of the size expressions contains
+// a DeclRefExpr which refers to a variable from an outer scope that is
+//
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
}
}
+// Loop over the parameters to see if any of the size expressions contains
cor3ntin wrote:
Can we
- Put all of that in a separate function
-
@@ -0,0 +1,68 @@
+// RUN: %clang_cc1 %s -std=c23 -verify=expected,c -fsyntax-only
+// RUN: %clang_cc1 %s -std=c23 -verify=good -fsyntax-only -Wno-vla
+// RUN: %clang_cc1 -x c++ %s -verify -fsyntax-only
+// RUN: %clang_cc1 -DCARET -fsyntax-only -std=c23
-fno-diagnostics-show-line-
uecker wrote:
And a final comment. While the main motivating use case for you may be VLAs in
parameter declarations (although as heavy user of those, I never felt the need
for such a warning), it would seem the warning would be relevant in cases
where the arrays are not actually VLAs. In ge