1 // RUN: %clang -Wframe-larger-than=42 \
2 // RUN: -v -E %s 2>&1 | FileCheck %s --check-prefix=ENABLE
3 // RUN: %clang -Wframe-larger-than=42 -Wno-frame-larger-than \
4 // RUN: -v -E %s 2>&1 | FileCheck %s --check-prefix=DISABLE
5 // RUN: %clang -Wframe-larger-than=42 -Wno-frame-larger-than -Wframe-larger-than=43 \
6 // RUN: -v -E %s 2>&1 | FileCheck %s --check-prefix=REENABLE
7 // RUN: not %clang -Wframe-larger-than= \
8 // RUN: -v -E %s 2>&1 | FileCheck %s --check-prefix=NOARG
9 // RUN: not %clang -Wframe-larger-than \
10 // RUN: -v -E %s 2>&1 | FileCheck %s --check-prefix=NOARG
11 // RUN: not %clang -Wframe-larger-than=0x2a -E %s 2>&1 | FileCheck %s --check-prefix=INVALID
13 // ENABLE: cc1 {{.*}} -fwarn-stack-size=42 {{.*}} -Wframe-larger-than=42
14 // ENABLE: frame-larger-than:
15 // ENABLE-SAME: warning
17 // DISABLE: cc1 {{.*}} -fwarn-stack-size=42 {{.*}} -Wframe-larger-than=42 -Wno-frame-larger-than
18 // DISABLE: frame-larger-than:
19 // DISABLE-SAME: ignored
21 // REENABLE: cc1 {{.*}} -fwarn-stack-size=43 {{.*}} -Wframe-larger-than=42 -Wno-frame-larger-than -Wframe-larger-than=43
22 // REENABLE: frame-larger-than:
23 // REENABLE-SAME: warning
25 // NOARG: error: invalid argument '' to -Wframe-larger-than=
26 // INVALID: error: invalid argument '0x2a' to -Wframe-larger-than=
28 // We need to create some state transitions before the pragma will dump anything.
29 #pragma clang diagnostic push
30 #pragma clang diagnostic warning "-Wframe-larger-than"
31 #pragma clang diagnostic pop
33 #pragma clang __debug diag_mapping "frame-larger-than"