Bug 1322462 - Ignore the is-NAN testings in libANGLE that clang plugin reports on Windows. r?ehsan draft bug-1322462
authorTing-Yu Chou <janus926@gmail.com>
Thu, 08 Dec 2016 22:29:53 +0800
changeset 447870 3ce0232d551edbfe13e64af577ac5843b336a3a2
parent 447759 c2526f6786f074888d71c8e166a02aea3e19e75b
child 539162 cc233d03f5fa228e1c9aac2ed2f2dbe1c5beb3cc
push id38204
push userbmo:janus926@gmail.com
push dateThu, 08 Dec 2016 14:31:15 +0000
reviewersehsan
bugs1322462
milestone53.0a1
Bug 1322462 - Ignore the is-NAN testings in libANGLE that clang plugin reports on Windows. r?ehsan MozReview-Commit-ID: 9pbUpA54dNq
build/clang-plugin/clang-plugin.cpp
--- a/build/clang-plugin/clang-plugin.cpp
+++ b/build/clang-plugin/clang-plugin.cpp
@@ -846,17 +846,18 @@ AST_MATCHER(BinaryOperator, isInSystemHe
   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"
+    "json_writer.cpp",
+    "State.cpp"
   };
 
   SourceLocation Loc = Node.getOperatorLoc();
   auto &SourceManager = Finder->getASTContext().getSourceManager();
   SmallString<1024> FileName = SourceManager.getFilename(Loc);
 
   for (auto itr = std::begin(whitelist); itr != std::end(whitelist); itr++) {
     if (llvm::sys::path::rbegin(FileName)->equals(*itr)) {