summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/no_stack_protector.c
blob: 8e52f0982f52f9d9acd68a2e23f802b589f6225e (plain)
1
2
3
4
5
// RUN: %clang_cc1 -fsyntax-only -verify %s

void __attribute__((no_stack_protector)) foo() {}
int __attribute__((no_stack_protector)) var; // expected-warning {{'no_stack_protector' attribute only applies to functions}}
void  __attribute__((no_stack_protector(2))) bar() {} // expected-error {{'no_stack_protector' attribute takes no arguments}}
OpenPOWER on IntegriCloud