Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel

This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
This commit is contained in:
Ehsan Akhgari
2015-04-10 23:05:46 -04:00
parent 7a01febba5
commit e383d2c003
15 changed files with 116 additions and 27 deletions

View File

@@ -1167,7 +1167,7 @@ public:
if (plugin)
mLibrary = plugin->GetLibrary();
}
operator bool() { return !!mLibrary; }
explicit operator bool() { return !!mLibrary; }
PluginLibrary* operator->() { return mLibrary; }
private: