Bug 1368948: Suppress clang-plugin errors. draft
authorBruce Sun <brsun@mozilla.com>
Wed, 14 Jun 2017 14:13:00 +0800
changeset 593826 c5a2101d547c1651e4abb9d5779601d30a1798ae
parent 593825 0ee6c24aefc8cbd497ab24f23940e96208574b29
child 593827 6af568518afceeef49637197b688ceaf2fa7e8d2
push id63822
push userbmo:brsun@mozilla.com
push dateWed, 14 Jun 2017 06:17:45 +0000
bugs1368948
milestone55.0a1
Bug 1368948: Suppress clang-plugin errors. MozReview-Commit-ID: EvWrEyPAsSB
build/clang-plugin/Utils.h
tools/rewriting/ThirdPartyPaths.txt
--- a/build/clang-plugin/Utils.h
+++ b/build/clang-plugin/Utils.h
@@ -156,17 +156,18 @@ inline bool isInIgnoredNamespaceForImpli
          Name == "google" ||            // protobuf
          Name == "google_breakpad" ||   // breakpad
          Name == "soundtouch" ||        // libsoundtouch
          Name == "stagefright" ||       // libstagefright
          Name == "MacFileUtilities" ||  // MacFileUtilities
          Name == "dwarf2reader" ||      // dwarf2reader
          Name == "arm_ex_to_module" ||  // arm_ex_to_module
          Name == "testing" ||           // gtest
-         Name == "Json";                // jsoncpp
+         Name == "Json" ||              // jsoncpp
+         Name == "pdfium";              // upstream pdfium 'base' package
 }
 
 inline bool isInIgnoredNamespaceForImplicitConversion(const Decl *Declaration) {
   std::string Name = getDeclarationNamespace(Declaration);
   if (Name == "") {
     return false;
   }
 
@@ -189,17 +190,18 @@ inline bool isIgnoredPathForImplicitCtor
         Begin->compare_lower(StringRef("angle")) == 0 ||
         Begin->compare_lower(StringRef("harfbuzz")) == 0 ||
         Begin->compare_lower(StringRef("hunspell")) == 0 ||
         Begin->compare_lower(StringRef("scoped_ptr.h")) == 0 ||
         Begin->compare_lower(StringRef("graphite2")) == 0 ||
         Begin->compare_lower(StringRef("icu")) == 0 ||
         Begin->compare_lower(StringRef("libcubeb")) == 0 ||
         Begin->compare_lower(StringRef("libstagefright")) == 0 ||
-        Begin->compare_lower(StringRef("cairo")) == 0) {
+        Begin->compare_lower(StringRef("cairo")) == 0 ||
+        Begin->compare_lower(StringRef("pdfium")) == 0) {
       return true;
     }
     if (Begin->compare_lower(StringRef("chromium")) == 0) {
       // Ignore security/sandbox/chromium but not ipc/chromium.
       ++Begin;
       return Begin != End && Begin->compare_lower(StringRef("sandbox")) == 0;
     }
   }
@@ -242,17 +244,18 @@ inline bool isIgnoredPathForSprintfLiter
         Begin->compare_lower(StringRef("harfbuzz")) == 0 ||
         Begin->compare_lower(StringRef("jsoncpp")) == 0 ||
         Begin->compare_lower(StringRef("libstagefright")) == 0 ||
         Begin->compare_lower(StringRef("mtransport")) == 0 ||
         Begin->compare_lower(StringRef("protobuf")) == 0 ||
         Begin->compare_lower(StringRef("skia")) == 0 ||
         Begin->compare_lower(StringRef("sfntly")) == 0 ||
         // Gtest uses snprintf as GTEST_SNPRINTF_ with sizeof
-        Begin->compare_lower(StringRef("testing")) == 0) {
+        Begin->compare_lower(StringRef("testing")) == 0 ||
+        Begin->compare_lower(StringRef("pdfium")) == 0) {
       return true;
     }
     if (Begin->compare_lower(StringRef("webrtc")) == 0) {
       // Ignore trunk/webrtc, but not media/webrtc
       ++Begin;
       return Begin != End && Begin->compare_lower(StringRef("trunk")) == 0;
     }
   }
--- a/tools/rewriting/ThirdPartyPaths.txt
+++ b/tools/rewriting/ThirdPartyPaths.txt
@@ -83,8 +83,9 @@ third_party/python/pyyaml/
 third_party/python/pytoml/
 third_party/python/redo/
 third_party/python/requests/
 third_party/python/rsa/
 third_party/python/which/
 toolkit/components/jsoncpp/
 toolkit/components/protobuf/
 toolkit/crashreporter/google-breakpad/
+widget/third_party/pdfium/