[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / Sema / no_stack_protector.c
blob1ecd46bc624ceb14dbda75549ef28d0dcbe88d4d
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s
3 [[gnu::no_stack_protector]] void test1(void) {}
4 [[clang::no_stack_protector]] void test2(void) {}
6 void __attribute__((no_stack_protector)) foo(void) {}
7 int __attribute__((no_stack_protector)) var; // expected-warning {{'no_stack_protector' attribute only applies to functions}}
8 void __attribute__((no_stack_protector(2))) bar(void) {} // expected-error {{'no_stack_protector' attribute takes no arguments}}