Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
[gecko.git] / build / clang-plugin / tests / TestExplicitOperatorBool.cpp
blobbc4b43a7d06ae6b1e748c8b141b1d1927cf06b88
1 #define MOZ_IMPLICIT __attribute__((annotate("moz_implicit")))
3 struct Bad {
4 operator bool(); // expected-error {{bad implicit conversion operator for 'Bad'}} expected-note {{consider adding the explicit keyword to 'operator bool'}}
5 };
6 struct Good {
7 explicit operator bool();
8 };
9 struct Okay {
10 MOZ_IMPLICIT operator bool();