Bug 1443438 - Modify matcher isInSystemHeader to be polymorphic. r=mystor
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 06 Mar 2018 11:59:05 +0200
changeset 406793 f40b3c7a568df0be3e81048197066abd66226261
parent 406792 78079f7c960104845743b69b05d02988a531e97d
child 406794 76c828bf2d0332ff25672569ae4b7c68d6fbe9c4
push id100512
push userdluca@mozilla.com
push dateTue, 06 Mar 2018 21:59:46 +0000
treeherdermozilla-inbound@667fe01d1d3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmystor
bugs1443438
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1443438 - Modify matcher isInSystemHeader to be polymorphic. r=mystor MozReview-Commit-ID: sA4XmHMkaR
build/clang-plugin/CustomMatchers.h
--- a/build/clang-plugin/CustomMatchers.h
+++ b/build/clang-plugin/CustomMatchers.h
@@ -105,17 +105,18 @@ AST_MATCHER(BinaryOperator, binaryCommaO
 }
 
 /// This matcher will match floating point types.
 AST_MATCHER(QualType, isFloat) { return Node->isRealFloatingType(); }
 
 /// This matcher will match locations in system headers.  This is adopted from
 /// isExpansionInSystemHeader in newer clangs, but modified in order to work
 /// with old clangs that we use on infra.
-AST_MATCHER(BinaryOperator, isInSystemHeader) {
+AST_POLYMORPHIC_MATCHER(isInSystemHeader,                                      \
+                        AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt)) {
   return ASTIsInSystemHeader(Finder->getASTContext(), Node);
 }
 
 /// This matcher will match a list of files.  These files contain
 /// known NaN-testing expressions which we would like to whitelist.
 AST_MATCHER(BinaryOperator, isInWhitelistForNaNExpr) {
   const char *whitelist[] = {"SkScalar.h", "json_writer.cpp", "State.cpp"};