mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 22:38:56 -04:00

- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
16 lines
907 B
C
16 lines
907 B
C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
int x __attribute__((constructor)); // expected-warning {{'constructor' attribute only applies to function types}}
|
|
int f() __attribute__((constructor));
|
|
int f() __attribute__((constructor(1)));
|
|
int f() __attribute__((constructor(1,2))); // expected-error {{attribute requires 0 or 1 argument(s)}}
|
|
int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires parameter 1 to be an integer constant}}
|
|
|
|
int x __attribute__((destructor)); // expected-warning {{'destructor' attribute only applies to function types}}
|
|
int f() __attribute__((destructor));
|
|
int f() __attribute__((destructor(1)));
|
|
int f() __attribute__((destructor(1,2))); // expected-error {{attribute requires 0 or 1 argument(s)}}
|
|
int f() __attribute__((destructor(1.0))); // expected-error {{'destructor' attribute requires parameter 1 to be an integer constant}}
|
|
|
|
|