Files
clang-p2996/clang/test/Sema/no_stack_protector.c
Sirui Mu 9d02770832 [clang] Parse attribute [[gnu::no_stack_protector]] (#75289)
This commit adds relative TableGen definitions to parse the
`[[gnu::no_stack_protector]]` attribute.

This PR addresses issue #75235.
2023-12-14 11:31:17 +08:00

9 lines
463 B
C

// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s
[[gnu::no_stack_protector]] void test1(void) {}
[[clang::no_stack_protector]] void test2(void) {}
void __attribute__((no_stack_protector)) foo(void) {}
int __attribute__((no_stack_protector)) var; // expected-warning {{'no_stack_protector' attribute only applies to functions}}
void __attribute__((no_stack_protector(2))) bar(void) {} // expected-error {{'no_stack_protector' attribute takes no arguments}}