xref: /llvm-project/clang/test/Modules/Inputs/overloadable-attrs/a.h (revision b7760210d3d42356e3a89db3a468c6959d0d6745)
19584508dSGeorge Burgess IV namespace enable_if_attrs {
fn1()29584508dSGeorge Burgess IV constexpr int fn1() __attribute__((enable_if(0, ""))) { return 0; }
fn1()39584508dSGeorge Burgess IV constexpr int fn1() { return 1; }
49584508dSGeorge Burgess IV 
fn2()59584508dSGeorge Burgess IV constexpr int fn2() { return 1; }
fn2()69584508dSGeorge Burgess IV constexpr int fn2() __attribute__((enable_if(0, ""))) { return 0; }
79584508dSGeorge Burgess IV 
fn3(int i)89584508dSGeorge Burgess IV constexpr int fn3(int i) __attribute__((enable_if(!i, ""))) { return 0; }
fn3(int i)99584508dSGeorge Burgess IV constexpr int fn3(int i) __attribute__((enable_if(i, ""))) { return 1; }
109584508dSGeorge Burgess IV 
fn4(int i)119584508dSGeorge Burgess IV constexpr int fn4(int i) { return 0; }
fn4(int i)129584508dSGeorge Burgess IV constexpr int fn4(int i) __attribute__((enable_if(i, ""))) { return 1; }
139584508dSGeorge Burgess IV 
fn5(int i)149584508dSGeorge Burgess IV constexpr int fn5(int i) __attribute__((enable_if(i, ""))) { return 1; }
fn5(int i)159584508dSGeorge Burgess IV constexpr int fn5(int i) { return 0; }
169584508dSGeorge Burgess IV }
17*b7760210SGeorge Burgess IV 
18*b7760210SGeorge Burgess IV namespace pass_object_size_attrs {
fn1(void * const a)19*b7760210SGeorge Burgess IV constexpr int fn1(void *const a __attribute__((pass_object_size(0)))) {
20*b7760210SGeorge Burgess IV   return 1;
21*b7760210SGeorge Burgess IV }
fn1(void * const a)22*b7760210SGeorge Burgess IV constexpr int fn1(void *const a) { return 0; }
23*b7760210SGeorge Burgess IV 
fn2(void * const a)24*b7760210SGeorge Burgess IV constexpr int fn2(void *const a) { return 0; }
fn2(void * const a)25*b7760210SGeorge Burgess IV constexpr int fn2(void *const a __attribute__((pass_object_size(0)))) {
26*b7760210SGeorge Burgess IV   return 1;
27*b7760210SGeorge Burgess IV }
28*b7760210SGeorge Burgess IV }
29