diff options
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r-- | clang/test/Analysis/cstring-syntax.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Analysis/cstring-syntax.c b/clang/test/Analysis/cstring-syntax.c index 4aa88ed3b7e..2cde0139c20 100644 --- a/clang/test/Analysis/cstring-syntax.c +++ b/clang/test/Analysis/cstring-syntax.c @@ -10,4 +10,6 @@ void testStrncat(const char *src) { strncat(dest, "AAAAAAAAAAAAAAAAAAAAAAAAAAA", sizeof(dest)); // expected-warning {{Potential buffer overflow. Replace with}} strncat(dest, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", sizeof(dest) - strlen(dest)); // expected-warning {{Potential buffer overflow. Replace with}} strncat(dest, src, sizeof(src)); // expected-warning {{Potential buffer overflow. Replace with}} + // Should not crash when sizeof has a type argument. + strncat(dest, "AAAAAAAAAAAAAAAAAAAAAAAAAAA", sizeof(char)); } |