[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Misc / backend-stack-frame-diagnostics-attributes.cpp
blobc7d8a23023e9c4688d42f63929b74543db651997
1 // Test the warn-stack-size function attribute is not generated when -Wframe-larger-than is ignored
2 // through pragma.
4 // RUN: %clang_cc1 -fwarn-stack-size=70 -emit-llvm -o - %s | FileCheck %s
5 // CHECK: "warn-stack-size"="70"
7 // RUN: %clang_cc1 -DIGNORED -fwarn-stack-size=70 -emit-llvm -o - %s | FileCheck %s --check-prefix=IGNORED
8 // IGNORED-NOT: "warn-stack-size"="70"
10 extern void doIt(char *);
12 #ifdef IGNORED
13 #pragma GCC diagnostic push
14 #pragma GCC diagnostic ignored "-Wframe-larger-than"
15 #endif
17 void frameSizeAttr() {
18 char buffer[80];
19 doIt(buffer);
22 #ifdef IGNORED
23 #pragma GCC diagnostic pop
24 #endif