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'}}
voidFunc9(void)__attribute__((assert_capability())){}// expected-warning {{'assert_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc10(void)__attribute__((assert_shared_capability())){}// expected-warning {{'assert_shared_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc13(void)__attribute__((acquire_capability())){}// expected-warning {{'acquire_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc14(void)__attribute__((acquire_shared_capability())){}// expected-warning {{'acquire_shared_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc18(void)__attribute__((release_capability())){}// expected-warning {{'release_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc19(void)__attribute__((release_shared_capability())){}// expected-warning {{'release_shared_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc20(void)__attribute__((release_generic_capability())){}// expected-warning {{'release_generic_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc21(void)__attribute__((try_acquire_capability(1))){}// expected-warning {{'try_acquire_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
voidFunc22(void)__attribute__((try_acquire_shared_capability(1))){}// expected-warning {{'try_acquire_shared_capability' attribute without capability arguments can only be applied to non-static methods of a class}}
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'}}