[clang-tools-extra] [clangd] Extract to function: Fix parameter declarator printing (PR #230046)
Aleksandr Platonov via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 12 07:59:49 PDT 2026
================
@@ -1200,6 +1215,17 @@ bool createParameters(NewFunction &ExtractedFunc,
// sizeof/alignof/typeof (or similar) on it.
if (DeclInfo.HasUnsafeTypeQueryUseInZone)
return false;
+ // A variable-length array's bound (at any nesting depth, e.g.
+ // the inner dimension of `int A[2][N]`) is an arbitrary
----------------
ArcsinX wrote:
Sorry, I was wrong here, we still problems with C++ VLA too.
E.g. `void extracted(int N, int (&A)[2][N])` compiles ok, but call to such function is not acceptable by `clang++`:
```cpp
void f() {
int N = 2;
int A[2][N];
extracted(N, A); // Compilation error here
}
https://github.com/llvm/llvm-project/pull/230046
More information about the cfe-commits
mailing list