CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
79 lines
2.2 KiB
C++
79 lines
2.2 KiB
C++
// REQUIRES: x86-registered-target
|
|
// RUN: %clang -target i386-apple-darwin -std=c++11 -fblocks -Wframe-larger-than=70 -Wno-stdlibcxx-not-found -Xclang -verify -o /dev/null -c %s
|
|
// RUN: %clang -target i386-apple-darwin -std=c++11 -fblocks -Wframe-larger-than=70 -Wno-stdlibcxx-not-found -Xclang -verify -o /dev/null -c %s -DIS_SYSHEADER
|
|
|
|
// Test that:
|
|
// * The driver passes the option through to the backend.
|
|
// * The frontend diagnostic handler 'demangles' and resolves the correct function definition.
|
|
|
|
// Test that link invocations don't emit an "argument unused during compilation" diagnostic.
|
|
// RUN: touch %t.o
|
|
// RUN: %clang -Werror -Wno-msvc-not-found -Wno-liblto -Wframe-larger-than=0 %t.o -### 2>&1 | not grep ' error: '
|
|
|
|
// TODO: Support rich backend diagnostics for Objective-C methods.
|
|
|
|
// Backend diagnostics aren't suppressed in system headers because such results
|
|
// are significant and actionable.
|
|
#ifdef IS_HEADER
|
|
|
|
#ifdef IS_SYSHEADER
|
|
#pragma clang system_header
|
|
#endif
|
|
|
|
extern void doIt(char *);
|
|
|
|
void frameSizeWarning(int, int) {}
|
|
|
|
void frameSizeWarning();
|
|
|
|
void frameSizeWarning() { // expected-warning-re {{stack frame size ({{[0-9]+}}) exceeds limit ({{[0-9]+}}) in 'frameSizeWarning()'}}
|
|
char buffer[80];
|
|
doIt(buffer);
|
|
}
|
|
|
|
void frameSizeWarning();
|
|
|
|
void frameSizeWarning(int) {}
|
|
|
|
#pragma GCC diagnostic push
|
|
#pragma GCC diagnostic ignored "-Wframe-larger-than"
|
|
void frameSizeWarningIgnored() {
|
|
char buffer[80];
|
|
doIt(buffer);
|
|
}
|
|
#pragma GCC diagnostic pop
|
|
|
|
void frameSizeLocalClassWarning() {
|
|
struct S {
|
|
S() { // expected-warning-re {{stack frame size ({{[0-9]+}}) exceeds limit ({{[0-9]+}}) in 'frameSizeLocalClassWarning()::S::S()'}}
|
|
char buffer[80];
|
|
doIt(buffer);
|
|
}
|
|
};
|
|
S();
|
|
}
|
|
|
|
void frameSizeLambdaWarning() {
|
|
auto fn =
|
|
[]() { // expected-warning-re {{stack frame size ({{[0-9]+}}) exceeds limit ({{[0-9]+}}) in 'frameSizeLambdaWarning()::$_0::operator()() const'}}
|
|
char buffer[80];
|
|
doIt(buffer);
|
|
};
|
|
fn();
|
|
}
|
|
|
|
void frameSizeBlocksWarning() {
|
|
auto fn =
|
|
^() { // expected-warning-re {{stack frame size ({{[0-9]+}}) exceeds limit ({{[0-9]+}}) in 'invocation function for block in frameSizeBlocksWarning()'}}
|
|
char buffer[80];
|
|
doIt(buffer);
|
|
};
|
|
fn();
|
|
}
|
|
|
|
#else
|
|
|
|
#define IS_HEADER
|
|
#include __FILE__
|
|
#endif
|