Bug 1319903 - Part 3: Revert to using Expr::IgnoreImplicit, pushed on a CLOSED TREE
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 23 Nov 2016 18:14:33 -0500
changeset 324142 9b19e41bbd08aea30a201c68e412e734b232d4f7
parent 324141 96c3b7bcd5a7c4f53254e412e8a9af25e35ece01
child 324143 54f07489d3c0b282d407ad437b72d030df981fa6
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
bugs1319903
milestone53.0a1
Bug 1319903 - Part 3: Revert to using Expr::IgnoreImplicit, pushed on a CLOSED TREE
build/clang-plugin/clang-plugin.cpp
--- a/build/clang-plugin/clang-plugin.cpp
+++ b/build/clang-plugin/clang-plugin.cpp
@@ -559,17 +559,17 @@ public:
     }
 
     return false;
   }
 
   void handleUnusedExprResult(const Stmt *Statement) {
     const Expr *E = dyn_cast_or_null<Expr>(Statement);
     if (E) {
-      E = E->IgnoreTrivials(); // Ignore ExprWithCleanup etc. implicit wrappers
+      E = E->IgnoreImplicit(); // Ignore ExprWithCleanup etc. implicit wrappers
       QualType T = E->getType();
       if (MustUse.hasEffectiveAnnotation(T) && !isIgnoredExprForMustUse(E)) {
         unsigned ErrorID = Diag.getDiagnosticIDs()->getCustomDiagID(
             DiagnosticIDs::Error, "Unused value of must-use type %0");
 
         Diag.Report(E->getLocStart(), ErrorID) << T;
         MustUse.dumpAnnotationReason(Diag, T, E->getLocStart());
       }