Bug 1075758 - Do not look at the ICU version number when whitelisting the ICU namespace in the clang plugin; r=Waldo
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 15 Jun 2015 13:31:44 -0400
changeset 279735 8d8487036f57262d386b8e706cd85774789c722b
parent 279734 6c03a601e58e08abf8a71747c4e0dad7b992d46b
child 279736 068df0223a6c4dd0e1e2d7828c5f3374f0186b94
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1075758
milestone41.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 1075758 - Do not look at the ICU version number when whitelisting the ICU namespace in the clang plugin; r=Waldo
build/clang-plugin/clang-plugin.cpp
--- a/build/clang-plugin/clang-plugin.cpp
+++ b/build/clang-plugin/clang-plugin.cpp
@@ -122,29 +122,30 @@ std::string getDeclarationNamespace(cons
 }
 
 bool isInIgnoredNamespaceForImplicitCtor(const Decl *decl) {
   std::string name = getDeclarationNamespace(decl);
   if (name == "") {
     return false;
   }
 
-  return name == "std" ||              // standard C++ lib
-         name == "__gnu_cxx" ||        // gnu C++ lib
-         name == "boost" ||            // boost
-         name == "webrtc" ||           // upstream webrtc
-         name == "icu_52" ||           // icu
-         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
+
+  return name == "std" ||               // standard C++ lib
+         name == "__gnu_cxx" ||         // gnu C++ lib
+         name == "boost" ||             // boost
+         name == "webrtc" ||            // upstream webrtc
+         name.substr(0, 4) == "icu_" || // icu
+         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
 }
 
 bool isInIgnoredNamespaceForImplicitConversion(const Decl *decl) {
   std::string name = getDeclarationNamespace(decl);
   if (name == "") {
     return false;
   }