Usage in an annotation is no odr-use, so I think there needs to be no
definition. Upside is that in practice one will get linker errors if it
is actually odr-used instead of calling a function that returns 0.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D106375
Mutex mu;
public:
- // For thread safety analysis only. Does not actually return mu.
- Mutex* getMu() RETURN_CAPABILITY(mu) { return 0; }
+ // For thread safety analysis only. Does not need to be defined.
+ Mutex* getMu() RETURN_CAPABILITY(mu);
void doSomething() REQUIRES(mu);
};