Issue 55402
Summary Clang fails to recognize '\0' as a synonym for 0 when warning
Labels clang:frontend, clang:diagnostics
Assignees
Reporter ChuanqiXu9
    Here is the reproducer https://godbolt.org/z/oYxbdaqaY:
```
#include <string.h>

void good(int *a, int n)
{
    memset(a, n, 0);  // warns
}

void bad(int *a, int n)
{
    memset(a, n, '\0');  // fails to warn
}

```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to