struct__attribute__((capability("wrong")))IncorrectName{};// expected-warning {{invalid capability name 'wrong'; capability name must be 'mutex' or 'role'}}
intTest1__attribute__((capability("test1")));// expected-error {{'capability' attribute only applies to structs, unions, classes, and typedefs}}
intTest2__attribute__((shared_capability("test2")));// expected-error {{'shared_capability' attribute only applies to structs, unions, classes, and typedefs}}
voidFunc5(void)__attribute__((requires_capability(1))){}// expected-warning {{'requires_capability' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
voidFunc6(void)__attribute__((requires_shared_capability(BadCapability))){}// expected-warning {{'requires_shared_capability' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'struct NotACapability'}}
voidFunc26(void)__attribute__((try_acquire_shared_capability())){}// expected-error {{'try_acquire_shared_capability' attribute takes at least 1 argument}}
// Test that boolean logic works with capability attributes
voidFunc31(void)__attribute__((requires_capability(GUI&&AlsoNotACapability)));// expected-warning {{'requires_capability' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}