Bug 1636148 - Disable Building Principal->GetURI r=ckerschb
authorSebastian Streich <sstreich@mozilla.com>
Thu, 14 May 2020 19:42:59 +0000
changeset 530184 1a7e54a71d1d17416b7351dea51db84f936b27d0
parent 530183 b328a689b6746c646d3d0132e94ac63f59f5f5ba
child 530185 09976687c44cce101946de2c0031826640ce42cc
push id116029
push userdluca@mozilla.com
push dateThu, 14 May 2020 23:28:28 +0000
treeherderautoland@1a7e54a71d1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb
bugs1636148
milestone78.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 1636148 - Disable Building Principal->GetURI r=ckerschb Differential Revision: https://phabricator.services.mozilla.com/D74249
build/clang-plugin/NoPrincipalGetURI.cpp
build/clang-plugin/tests/TestNoPrincipalGetUri.cpp
--- a/build/clang-plugin/NoPrincipalGetURI.cpp
+++ b/build/clang-plugin/NoPrincipalGetURI.cpp
@@ -16,12 +16,12 @@ void NoPrincipalGetURI::registerMatchers
           argumentCountIs(1))
           .bind("id"),
       this);
 }
 
 void NoPrincipalGetURI::check(const MatchFinder::MatchResult &Result) {
   const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXMemberCallExpr>("id");
   diag(MatchedDecl->getExprLoc(),
-       "nsIPrincipal->GetURI is depricated and will be removed soon. Please "
+       "Principal->GetURI is depricated and will be removed soon. Please "
        "consider using the new helper functions of nsIPrincipal",
-       DiagnosticIDs::Warning);
+       DiagnosticIDs::Error);
 }
--- a/build/clang-plugin/tests/TestNoPrincipalGetUri.cpp
+++ b/build/clang-plugin/tests/TestNoPrincipalGetUri.cpp
@@ -12,20 +12,20 @@ class NullPrincipal : public SomePrincip
 
 class SomeURI {
 public:
   void GetURI(int foo) {}
 };
 
 void f() {
   nsIPrincipal *a = new SomePrincipal();
-  a->GetURI(0); //  expected-warning {{nsIPrincipal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal}}
+  a->GetURI(0); //  expected-error {{Principal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal}}
 
   nsIPrincipal *b = new NullPrincipal();
-  b->GetURI(0); //  expected-warning {{nsIPrincipal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal}}
+  b->GetURI(0); //  expected-error {{Principal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal}}
 
   SomeURI *c = new SomeURI();
   c->GetURI(0);
 
   SomePrincipal *d = new SomePrincipal();
   d->GetURI(0);
 
 }
\ No newline at end of file