<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56758>56758</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`misc-const-correctness` does not issue warning for `char` array passed to function
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
firewave
</td>
</tr>
</table>
<pre>
```cpp
extern void cb(const char code[]);
extern void cb2(char code[]);
template<typename T>
void f2(const T& expected) {
}
void f() {
char code[] = ""; // no warning
cb(code);
char code2[] = ""; // no warning
cb2(code2);
char code3[] = ""; // warning
f2(code3);
char code4[] = ""; // warning
char code5[1] = ""; // no warning
cb(code5);
}
```
https://godbolt.org/z/ed7r531Ec
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydk9GSmyAUhp8Gb5jNKIjGCy42zfYJ9gUQjgkdAw5gsunT96g1TbbddrYOKMzh__g5HFtvrpJU-dL0MJB8T_JneEsQHD17a6huCdtq72Ki-qgC1d4AETsi9oQ1hO8WxZ90bBL-S5LgNPQqAeFf0nUAp05AXwl_WaIzqWM3B6-EVRTeBtAJDMIoqVdavb_HLkLUPSyi-LxzRAnHztjU-A5HX7FR5-lFBWfd4U64JAKFd4d4ILLPI9lPJvsQyv8G_Y3YrUD-IbD8FPAmEygr_i9h4uHabxe1lt0yPaY0RMKfF-DBm9b3aePDAWffsYOpg-DFi16WZyCLSmybklclz4zkpuGNypJNPUwVfbJRP81Fg-8QsGAcxIgBajxE9JuojXGE1TbtfKDTP4DnnVapENSVDipGMDR52o1OJ-tdNoZevvNq03FsN9qfcNL35_XzNAT_DTfG6bxVxIGoarHNjlLVBrZFVTa8LfMq77gRClSrTGO06BhkvWqhj3K6K8YcXBa3U9LFPrOS5YzlNauLusxLvikbLCUmWFWpaguNIWUOJ2X7zeRjSmIW5GypHQ8Rg72NKf4K4intwQHIpTQyNaajD7KzAS7qDNm8t5y9_wB0dS9A">