[clang] Diagnose potential size confusion with VLA params [contd.] (PR #181550)
Yeoul Na via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 16 13:58:05 PST 2026
rapidsna wrote:
> Note that this confusion in principle applies to any use of any identifier, not just constants but also others in sizeof / typeof.
Per @uecker's comment: I assume the current implementation already warns these cases since we use `ConstDynamicRecursiveASTVisitor`, but we need to add more tests. @ak1932 could you please add more tests similar to below?
```C
int a[10];
void foo(int arr[sizeof(a)], int a[16]); // warning
```
https://github.com/llvm/llvm-project/pull/181550
More information about the cfe-commits
mailing list