[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / cstring-syntax-weird.c
blob9a58f1609f7ae0b35b572165982c73256928c831
1 // RUN: %clang_analyze_cc1 -w -analyzer-checker=unix.cstring.BadSizeArg \
2 // RUN: -verify %s
4 // expected-no-diagnostics
6 typedef __SIZE_TYPE__ size_t;
7 // The last parameter is normally size_t but the test is about the abnormal
8 // situation when it's not a size_t.
9 size_t strlcpy(char *, const char *, int);
11 enum WeirdDecl {
12 AStrangeWayToSpecifyStringLengthCorrectly = 10UL,
13 AStrangeWayToSpecifyStringLengthIncorrectly = 5UL
15 void testWeirdDecls(const char *src) {
16 char dst[10];
17 strlcpy(dst, src, AStrangeWayToSpecifyStringLengthCorrectly); // no-crash
18 strlcpy(dst, src, AStrangeWayToSpecifyStringLengthIncorrectly); // no-crash // no-warning