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
12 // ENABLE: cc1 {{.*}} -fwarn-stack-size=42 {{.*}} -Wframe-larger-than=42
13 // ENABLE: frame-larger-than:
14 // ENABLE-SAME: warning
16 // DISABLE: cc1 {{.*}} -fwarn-stack-size=42 {{.*}} -Wframe-larger-than=42 -Wno-frame-larger-than
17 // DISABLE: frame-larger-than:
18 // DISABLE-SAME: ignored
20 // REENABLE: cc1 {{.*}} -fwarn-stack-size=43 {{.*}} -Wframe-larger-than=42 -Wno-frame-larger-than -Wframe-larger-than=43
21 // REENABLE: frame-larger-than:
22 // REENABLE-SAME: warning
24 // NOARG: error: argument to '-Wframe-larger-than=' is missing
26 // We need to create some state transitions before the pragma will dump anything.
27 #pragma clang diagnostic push
28 #pragma clang diagnostic warning "-Wframe-larger-than"
29 #pragma clang diagnostic pop
31 #pragma clang __debug diag_mapping "frame-larger-than"