/external/clang/test/Sema/ |
D | attr-capabilities.c | 3 typedef int __attribute__((capability("role"))) ThreadRole; 4 struct __attribute__((shared_capability("mutex"))) Mutex {}; 8 union __attribute__((capability("mutex"))) MutexUnion { int a; char* b; }; 9 typedef union { int a; char* b; } __attribute__((capability("mutex"))) MutexUnion2; 12 struct __attribute__((capability("wrong"))) IncorrectName {}; // expected-warning {{invalid capabil… 14 int Test1 __attribute__((capability("test1"))); // expected-error {{'capability' attribute only ap… 15 int Test2 __attribute__((shared_capability("test2"))); // expected-error {{'shared_capability' attr… 16 int Test3 __attribute__((acquire_capability("test3"))); // expected-warning {{'acquire_capability'… 17 int Test4 __attribute__((try_acquire_capability("test4"))); // expected-error {{'try_acquire_capabi… 18 int Test5 __attribute__((release_capability("test5"))); // expected-warning {{'release_capability' … [all …]
|
D | attr-availability.c | 5 void f0() __attribute__((availability(macosx,introduced=10.4,deprecated=10.2))); // expected-warnin… 6 void f1() __attribute__((availability(ios,obsoleted=2.1,deprecated=3.0))); // expected-warning{{fe… 7 void f2() __attribute__((availability(ios,introduced=2.1,deprecated=2.1))); 9 void f3() __attribute__((availability(otheros,introduced=2.2))); // expected-warning{{unknown platf… 13 ATSFontGetName(const char *oName) __attribute__((availability(macosx,introduced=8.0,deprecated=9.0,… 16 ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduced=8.0,obsoleted=9.0… 22 PartiallyAvailable() __attribute__((availability(macosx,introduced=10.8))); 24 enum __attribute__((availability(macosx,introduced=10.8))) PartialEnum { 47 __attribute__((availability(macos, unavailable))) // expected-warning {{attribute 'availability' is… 53 void f4(int) __attribute__((availability(ios,deprecated=3.0))); [all …]
|
D | attr-mode-vector-types.c | 4 typedef int __attribute__((mode(byte))) __attribute__((vector_size(256))) vec_t1; 5 typedef int __attribute__((mode(QI))) __attribute__((vector_size(256))) vec_t2; 6 typedef int __attribute__((mode(SI))) __attribute__((vector_size(256))) vec_t3; 7 typedef int __attribute__((mode(DI))) __attribute__((vector_size(256)))vec_t4; 8 typedef float __attribute__((mode(SF))) __attribute__((vector_size(256))) vec_t5; 9 typedef float __attribute__((mode(DF))) __attribute__((vector_size(256))) vec_t6; 10 typedef float __attribute__((mode(XF))) __attribute__((vector_size(256))) vec_t7; 12 typedef int v8qi __attribute__ ((mode(QI))) __attribute__ ((vector_size(8))); 13 typedef int v8qi __attribute__ ((mode(V8QI))); 16 typedef float v4sf __attribute__((mode(V4SF))); [all …]
|
D | attr-alias-elf.c | 3 void f1(void) __attribute__((alias("g1"))); 7 void f2(void) __attribute__((alias("g2"))); // expected-error {{alias must point to a defined varia… 10 void f3(void) __attribute__((alias("g3"))); // expected-error {{alias must point to a defined varia… 14 void f4() __attribute__((alias("g4"))); 16 void h4() __attribute__((alias("f4"))); 18 void f5() __attribute__((alias("g5"))); 19 void h5() __attribute__((alias("f5"))); 23 void f6() __attribute__((alias("g6"))); 24 void h6() __attribute__((alias("f6"))); 27 void h7() __attribute__((alias("f7"))); [all …]
|
D | enable_if.c | 10 …har *pathname, int flags) __attribute__((enable_if(!(flags & O_CREAT), "must specify mode when usi… 11 int open(const char *pathname, int flags, mode_t mode) __attribute__((overloadable)); // expected-… 25 __attribute__((overloadable)) 28 __attribute__((always_inline)) 30 __attribute__((overloadable)) in strnlen() 31 __attribute__((enable_if(__builtin_object_size(s, 0) != -1, in strnlen() 38 __attribute__((overloadable)) 39 __attribute__((enable_if(__builtin_object_size(s, 0) != -1, 41 __attribute__((enable_if(maxlen <= __builtin_object_size(s, 0), 46 __attribute__((overloadable)) [all …]
|
D | callingconv.c | 4 void __attribute__((fastcall)) foo(float *a) { in foo() 7 void __attribute__((stdcall)) bar(float *a) { in bar() 10 void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{'fastcall' attribute takes no… in baz() 13 void __attribute__((fastcall)) test0() { in test0() 16 void __attribute__((fastcall)) test1(void) { in test1() 19 void __attribute__((fastcall)) test2(int a, ...) { // expected-warning {{fastcall calling conventio… in test2() 21 void __attribute__((stdcall)) test3(int a, ...) { // expected-warning {{stdcall calling convention … in test3() 23 void __attribute__((thiscall)) test4(int a, ...) { // expected-error {{variadic function cannot use… in test4() 26 void __attribute__((cdecl)) ctest0() {} in ctest0() 28 void __attribute__((cdecl(1))) ctest1(float x) {} // expected-error {{'cdecl' attribute takes no ar… in ctest1() [all …]
|
D | attr-format.c | 5 void a(const char *a, ...) __attribute__((format(printf, 1,2))); // no-error 6 void b(const char *a, ...) __attribute__((format(printf, 1,1))); // expected-error {{'format' attri… 7 void c(const char *a, ...) __attribute__((format(printf, 0,2))); // expected-error {{'format' attri… 8 void d(const char *a, int c) __attribute__((format(printf, 1,2))); // expected-error {{format attri… 9 void e(char *str, int c, ...) __attribute__((format(printf, 2,3))); // expected-error {{format argu… 12 void f(xpto c, va_list list) __attribute__((format(printf, 1, 0))); // no-error 13 void g(xpto c) __attribute__((format(printf, 1, 0))); // no-error 15 void y(char *str) __attribute__((format(strftime, 1,0))); // no-error 16 void z(char *str, int c, ...) __attribute__((format(strftime, 1,2))); // expected-error {{strftime … 18 int (*f_ptr)(char*,...) __attribute__((format(printf, 1,2))); // no-error [all …]
|
D | overloadable.c | 3 int var __attribute__((overloadable)); // expected-error{{'overloadable' attribute only applies to … 4 void params(void) __attribute__((overloadable(12))); // expected-error {{'overloadable' attribute t… 6 int *f(int) __attribute__((overloadable)); // expected-note 2{{previous overload of function is her… 10 double *f(double) __attribute__((overloadable)); // okay, new 18 int *accept_funcptr(int (*)()) __attribute__((overloadable)); // \ 20 float *accept_funcptr(int (*)(int, double)) __attribute__((overloadable)); // \ 31 int* accept_struct(struct X x) __attribute__((__overloadable__)); 32 float* accept_struct(struct Y y) __attribute__((overloadable)); 39 double *f(int) __attribute__((overloadable)); // expected-error{{conflicting types for 'f'}} 41 double promote(float) __attribute__((__overloadable__)); // expected-note {{candidate}} [all …]
|
D | callingconv-iamcu.c | 3 void __attribute__((fastcall)) foo(float *a) { // expected-warning {{calling convention 'fastcall' … in foo() 6 void __attribute__((stdcall)) bar(float *a) { // expected-warning {{calling convention 'stdcall' ig… in bar() 9 void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{'fastcall' attribute takes no… in baz() 12 void __attribute__((fastcall)) test2(int a, ...) { // expected-warning {{calling convention 'fastca… in test2() 14 void __attribute__((stdcall)) test3(int a, ...) { // expected-warning {{calling convention 'stdcall… in test3() 16 void __attribute__((thiscall)) test4(int a, ...) { // expected-warning {{calling convention 'thisca… in test4() 19 void __attribute__((cdecl)) ctest0() {} in ctest0() 21 void __attribute__((cdecl(1))) ctest1(float x) {} // expected-error {{'cdecl' attribute takes no ar… in ctest1() 23 void (__attribute__((fastcall)) *pfoo)(float*) = foo; // expected-warning {{calling convention 'fas… 25 void (__attribute__((stdcall)) *pbar)(float*) = bar; // expected-warning {{calling convention 'stdc… [all …]
|
D | attr-ownership.c | 3 void f1(void) __attribute__((ownership_takes("foo"))); // expected-error {{'ownership_takes' attrib… 4 void *f2(void) __attribute__((ownership_returns(foo, 1, 2))); // expected-error {{'ownership_retur… 5 void f3(void) __attribute__((ownership_holds(foo, 1))); // expected-error {{'ownership_holds' attri… 6 void *f4(void) __attribute__((ownership_returns(foo))); 7 void f5(void) __attribute__((ownership_holds(foo))); // expected-error {{'ownership_holds' attribu… 8 void f6(void) __attribute__((ownership_holds(foo, 1, 2, 3))); // expected-error {{'ownership_holds… 9 void f7(void) __attribute__((ownership_takes(foo))); // expected-error {{'ownership_takes' attribu… 10 void f8(int *i, int *j, int k) __attribute__((ownership_holds(foo, 1, 2, 4))); // expected-error {… 12 int f9 __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute… 14 void f10(int i) __attribute__((ownership_holds(foo, 1))); // expected-error {{'ownership_holds' at… [all …]
|
D | nonnull.c | 10 } Instance __attribute__((transparent_union)); 12 __attribute__((nonnull(1))) void Class_init(Instance this, char *str) { in Class_init() 22 void foo(const char *str) __attribute__((nonnull("foo"))); // expected-error{{'nonnull' attribute r… 23 void bar(int i) __attribute__((nonnull(1))); // expected-warning {{'nonnull' attribute only applies… 25 void baz(__attribute__((nonnull)) const char *str); 26 void baz2(__attribute__((nonnull(1))) const char *str); // expected-warning {{'nonnull' attribute w… 27 void baz3(__attribute__((nonnull)) int x); // expected-warning {{'nonnull' attribute only applies t… 35 void test_void_returns_nonnull(void) __attribute__((returns_nonnull)); // expected-warning {{'retur… 36 int test_int_returns_nonnull(void) __attribute__((returns_nonnull)); // expected-warning {{'returns… 37 void *test_ptr_returns_nonnull(void) __attribute__((returns_nonnull)); // no-warning [all …]
|
D | attr-availability-watchos.c | 3 void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1))); // expected-note {{'… 4 void f1(int) __attribute__((availability(ios,introduced=2.1))); 5 void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'… 6 void f3(int) __attribute__((availability(ios,introduced=3.0))); 7 void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), av… 8 void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,depr… 9 void f6(int) __attribute__((availability(ios,deprecated=12.1))); // OK - not deprecated for watchOS 10 void f7(int) __attribute__((availability(ios,deprecated=8.3))); // expected-note {{'f7' has been ex… 11 void f8(int) __attribute__((availability(ios,introduced=2.0,obsoleted=10.0))); // expected-note {{e… 26 void f0_watchos(int) __attribute__((availability(watchos,introduced=2.0,deprecated=2.1))); // expec… [all …]
|
D | attr-availability-tvos.c | 3 void f0(int) __attribute__((availability(tvos,introduced=2.0,deprecated=2.1))); // expected-note {{… 4 void f1(int) __attribute__((availability(tvos,introduced=2.1))); 5 void f2(int) __attribute__((availability(tvos,introduced=2.0,deprecated=3.0))); // expected-note {{… 6 void f3(int) __attribute__((availability(tvos,introduced=3.0))); 7 void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), av… 9 void f5(int) __attribute__((availability(tvos,introduced=2.0))) __attribute__((availability(tvos,de… 10 void f6(int) __attribute__((availability(tvos,deprecated=3.0))); 11 void f6(int) __attribute__((availability(tvos,introduced=2.0))); // expected-note {{'f6' has been e… 24 void f9(int) __attribute__((availability(ios,introduced=2.0,deprecated=9.0))); 31 void f0_tvos(int) __attribute__((availability(tvos,introduced=2.0,deprecated=2.1))); // expected-no… [all …]
|
D | mips-interrupt-attr.c | 4 struct a test __attribute__((interrupt)); // expected-warning {{'interrupt' attribute only applies … 6 __attribute__((interrupt("EIC"))) void foo1() {} // expected-warning {{'interrupt' attribute argume… in foo1() 8 __attribute__((interrupt("eic", 1))) void foo2() {} // expected-error {{'interrupt' attribute takes… in foo2() 10 __attribute__((interrupt("eic"))) void foo3() {} in foo3() 11 __attribute__((interrupt("vector=sw0"))) void foo4() {} in foo4() 12 __attribute__((interrupt("vector=hw0"))) void foo5() {} in foo5() 13 __attribute__((interrupt("vector=hw1"))) void foo6() {} in foo6() 14 __attribute__((interrupt("vector=hw2"))) void foo7() {} in foo7() 15 __attribute__((interrupt("vector=hw3"))) void foo8() {} in foo8() 16 __attribute__((interrupt("vector=hw4"))) void foo9() {} in foo9() [all …]
|
/external/clang/test/SemaCXX/ |
D | attr-optnone.cpp | 3 int foo() __attribute__((optnone)); 4 int bar() __attribute__((optnone)) __attribute__((noinline)); 6 int baz() __attribute__((always_inline)) __attribute__((optnone)); // expected-warning{{'always_inl… 7 int quz() __attribute__((optnone)) __attribute__((always_inline)); // expected-warning{{'always_inl… 9 __attribute__((always_inline)) int baz1(); // expected-warning{{'always_inline' attribute ignored}} 10 __attribute__((optnone)) int baz1() { return 1; } // expected-note{{conflicting attribute is here}} in baz1() 12 __attribute__((optnone)) int quz1(); // expected-note{{conflicting attribute is here}} 13 __attribute__((always_inline)) int quz1() { return 1; } // expected-warning{{'always_inline' attrib… in quz1() 15 int bay() __attribute__((minsize)) __attribute__((optnone)); // expected-warning{{'minsize' attribu… 16 int quy() __attribute__((optnone)) __attribute__((minsize)); // expected-warning{{'minsize' attribu… [all …]
|
D | attr-noreturn.cpp | 7 __attribute__((noreturn)) void fail(); 21 __attribute__((noreturn)) void fail(); 24 ~A() __attribute__((noreturn)) { fail(); } in ~A() 28 ~B() __attribute__((noreturn)) { fail(); } in ~B() 44 __attribute__((noreturn)) void test_1() { A a; } in test_1() 45 __attribute__((noreturn)) void test_2() { B b; } in test_2() 46 __attribute__((noreturn)) void test_3() { C c; } in test_3() 47 __attribute__((noreturn)) void test_4() { D d; } in test_4() 48 __attribute__((noreturn)) void test_5() { E e; } in test_5() 49 __attribute__((noreturn)) void test_6() { F f; } in test_6() [all …]
|
D | warn-thread-safety-verbose.cpp | 3 #define LOCKABLE __attribute__ ((lockable)) 4 #define SCOPED_LOCKABLE __attribute__ ((scoped_lockable)) 5 #define GUARDED_BY(x) __attribute__ ((guarded_by(x))) 6 #define GUARDED_VAR __attribute__ ((guarded_var)) 7 #define PT_GUARDED_BY(x) __attribute__ ((pt_guarded_by(x))) 8 #define PT_GUARDED_VAR __attribute__ ((pt_guarded_var)) 9 #define ACQUIRED_AFTER(...) __attribute__ ((acquired_after(__VA_ARGS__))) 10 #define ACQUIRED_BEFORE(...) __attribute__ ((acquired_before(__VA_ARGS__))) 11 #define EXCLUSIVE_LOCK_FUNCTION(...) __attribute__ ((exclusive_lock_function(__VA_ARGS__))) 12 #define SHARED_LOCK_FUNCTION(...) __attribute__ ((shared_lock_function(__VA_ARGS__))) [all …]
|
D | enable_if.cpp | 11 …X(bool b) __attribute__((enable_if(b, "chosen when 'b' is true"))); // expected-note{{candidate d… 13 void f(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))); 14 …void f(int n) __attribute__((enable_if(n == 1, "chosen when 'n' is one"))); // expected-note{{mem… 16 …void g(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))); // expected-note{{ca… 18 …void h(int n, int m = 0) __attribute__((enable_if(m == 0, "chosen when 'm' is zero"))); // expect… 20 …static void s(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))); // expected-n… 22 …void conflict(int n) __attribute__((enable_if(n+n == 10, "chosen when 'n' is five"))); // expecte… 23 …void conflict(int n) __attribute__((enable_if(n*2 == 10, "chosen when 'n' is five"))); // expecte… 25 …void hidden_by_argument_conversion(Incomplete n, int m = 0) __attribute__((enable_if(m == 10, "cho… 26 …Incomplete hidden_by_incomplete_return_value(int n = 0) __attribute__((enable_if(n == 10, "chosen … [all …]
|
D | warn-thread-safety-negative.cpp | 6 #define LOCKABLE __attribute__ ((lockable)) 7 #define SCOPED_LOCKABLE __attribute__ ((scoped_lockable)) 8 #define GUARDED_BY(x) __attribute__ ((guarded_by(x))) 9 #define GUARDED_VAR __attribute__ ((guarded_var)) 10 #define PT_GUARDED_BY(x) __attribute__ ((pt_guarded_by(x))) 11 #define PT_GUARDED_VAR __attribute__ ((pt_guarded_var)) 12 #define ACQUIRED_AFTER(...) __attribute__ ((acquired_after(__VA_ARGS__))) 13 #define ACQUIRED_BEFORE(...) __attribute__ ((acquired_before(__VA_ARGS__))) 14 #define EXCLUSIVE_LOCK_FUNCTION(...) __attribute__ ((exclusive_lock_function(__VA_ARGS__))) 15 #define SHARED_LOCK_FUNCTION(...) __attribute__ ((shared_lock_function(__VA_ARGS__))) [all …]
|
/external/clang/test/Parser/ |
D | attributes.c | 3 int __attribute__(()) x; 5 __inline void __attribute__((__always_inline__, __nodebug__)) 10 __attribute__(()) y; // expected-warning {{defaults to 'int'}} 13 int (__attribute__(()) *z)(long y); 16 void f1(__attribute__(()) int x); 18 int f2(y, __attribute__(()) x); // expected-error {{expected identifier}} 22 void f3(__attribute__(()) x, // expected-warning {{defaults to 'int'}} 25 void f4(__attribute__(())); // expected-error {{expected parameter declarator}} 29 int baz(int (__attribute__(()) *x)(long y)); 31 void g1(void (*f1)(__attribute__(()) int x)); [all …]
|
/external/libcxxabi/src/ |
D | private_typeinfo.h | 21 class __attribute__ ((__visibility__("default"))) __shim_type_info 25 __attribute__ ((__visibility__("hidden"))) virtual ~__shim_type_info(); 27 __attribute__ ((__visibility__("hidden"))) virtual void noop1() const; 28 __attribute__ ((__visibility__("hidden"))) virtual void noop2() const; 29 …__attribute__ ((__visibility__("hidden"))) virtual bool can_catch(const __shim_type_info* thrown_t… 32 class __attribute__ ((__visibility__("default"))) __fundamental_type_info 36 __attribute__ ((__visibility__("hidden"))) virtual ~__fundamental_type_info(); 37 …__attribute__ ((__visibility__("hidden"))) virtual bool can_catch(const __shim_type_info*, void*&)… 40 class __attribute__ ((__visibility__("default"))) __array_type_info 44 __attribute__ ((__visibility__("hidden"))) virtual ~__array_type_info(); [all …]
|
/external/clang/test/SemaObjC/ |
D | method-attributes.m | 6 -t1 __attribute__((noreturn)); method 7 - (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1… 8 -(void) m0 __attribute__((noreturn)); method 9 -(void) m1 __attribute__((unused)); method 10 -(void) m2 __attribute__((stdcall)); method 11 -(void) m3 __attribute__((optnone)); method 16 - (int) foo1: (int)arg1 __attribute__((deprecated)); 20 - (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); 21 - (int) foo3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) __attribute__((ns_… 25 - (int) foo: (int)arg1 __attribute__((deprecated)){ [all …]
|
/external/elfutils/libebl/ |
D | eblopenbackend.c | 433 default_object_type_name (int ignore __attribute__ ((unused)), in default_object_type_name() 434 char *buf __attribute__ ((unused)), in default_object_type_name() 435 size_t len __attribute__ ((unused))) in default_object_type_name() 441 default_reloc_type_name (int ignore __attribute__ ((unused)), in default_reloc_type_name() 442 char *buf __attribute__ ((unused)), in default_reloc_type_name() 443 size_t len __attribute__ ((unused))) in default_reloc_type_name() 449 default_reloc_type_check (int ignore __attribute__ ((unused))) in default_reloc_type_check() 455 default_reloc_valid_use (Elf *elf __attribute__ ((unused)), in default_reloc_valid_use() 456 int ignore __attribute__ ((unused))) in default_reloc_valid_use() 462 default_reloc_simple_type (Ebl *eh __attribute__ ((unused)), in default_reloc_simple_type() [all …]
|
/external/clang/test/Headers/ |
D | x86intrin-2.c | 11 void __attribute__((__target__("mmx"))) mm_empty_wrap(void) { in mm_empty_wrap() 15 __m128 __attribute__((__target__("sse"))) mm_add_ss_wrap(__m128 a, __m128 b) { in mm_add_ss_wrap() 19 __m128d __attribute__((__target__("sse2"))) mm_sqrt_sd_wrap(__m128d a, __m128d b) { in mm_sqrt_sd_wrap() 23 void __attribute__((__target__("sse3"))) mm_mwait_wrap(int a) { in mm_mwait_wrap() 27 __m64 __attribute__((__target__("ssse3"))) mm_abs_pi8_wrap(__m64 a) { in mm_abs_pi8_wrap() 31 __m128i __attribute__((__target__("sse4.1"))) mm_minpos_epu16_wrap(__m128i v) { in mm_minpos_epu16_wrap() 35 unsigned int __attribute__((__target__("sse4.2"))) mm_crc32_u8_wrap(unsigned int c, unsigned char d… in mm_crc32_u8_wrap() 39 __m128i __attribute__((__target__("aes"))) mm_aesenc_si128_wrap(__m128i v, __m128i r) { in mm_aesenc_si128_wrap() 43 __m256d __attribute__((__target__("avx"))) mm256_add_pd_wrap(__m256d a, __m256d b) { in mm256_add_pd_wrap() 47 __m256i __attribute__((__target__("avx2"))) mm256_abs_epi8_wrap(__m256i a) { in mm256_abs_epi8_wrap() [all …]
|
/external/clang/test/CodeGen/ |
D | attributes.c | 5 int t5 __attribute__((weak)) = 2; 9 struct s0 t13 __attribute__((section("SECT"))) = { 0 }; 13 static int x __attribute__((section("SECT"))) = 0; in t14() 17 extern int t18 __attribute__((weak_import)); 21 extern int t16 __attribute__((weak_import)); 24 int t6 __attribute__((visibility("protected"))); 27 int t12 __attribute__((section("SECT"))); 31 void t9() __attribute__((weak, alias("__t8"))); 34 int __attribute__((weak_import)) t15(void); 40 void t1() __attribute__((noreturn)); [all …]
|