mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1707681 - Ignore third party paths in explicit-operator-bool check r=andi
Differential Revision: https://phabricator.services.mozilla.com/D113695
This commit is contained in:
parent
0eb94679e5
commit
1b59a49ab1
@ -6,11 +6,8 @@
|
||||
#include "CustomMatchers.h"
|
||||
|
||||
void ExplicitOperatorBoolChecker::registerMatchers(MatchFinder *AstMatcher) {
|
||||
// Older clang versions such as the ones used on the infra recognize these
|
||||
// conversions as 'operator _Bool', but newer clang versions recognize these
|
||||
// as 'operator bool'.
|
||||
AstMatcher->addMatcher(
|
||||
cxxMethodDecl(anyOf(hasName("operator bool"), hasName("operator _Bool")))
|
||||
cxxMethodDecl(allOf(isFirstParty(), hasName("operator bool")))
|
||||
.bind("node"),
|
||||
this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user