[PATCH] Delete various dead assignments

Gautier DI FOLCO gautier.difolco at gmail.com
Fri Mar 7 00:18:35 PST 2014


  2014-03-06 23:07 GMT+01:00 Richard Smith <richard at metafoo.co.uk>:

  >
  >
  > ================
  > Comment at: lib/AST/CommentCommandTraits.cpp:65
  > @@ -64,3 +64,2 @@
  >      BestCommand.push_back(Command);
  > -    BestEditDistance = EditDistance;
  >    }
  > ----------------
  > Fixed in r203153.
  >
  > ================
  > Comment at: lib/Lex/ModuleMap.cpp:1965
  > @@ -1964,3 +1964,2 @@
  >        Diags.Report(StarLoc, diag::err_mmap_inferred_framework_submodule);
  > -      Framework = false;
  >      }
  > ----------------
  > We don't seem to use the `Framework` flag in this function at all; this
  > looks like a bug.
  >
  > ================
  > Comment at: lib/Sema/SemaDeclCXX.cpp:11461
  > @@ -11460,3 +11460,2 @@
  >          << TypeWithKeyword::getTagTypeKindName(Kind) << Name;
  > -      isExplicitSpecialization = true;
  >      }
  > ----------------
  > This one looks fine to drop, but the code is arguably more robust to
  > future changes with this dead store.
  >
  > ================
  > Comment at: lib/Sema/SemaTemplate.cpp:5932-5938
  > @@ -5931,9 +5931,6 @@
  >          << SourceRange(LAngleLoc, RAngleLoc);
  > -    else
  > -      isExplicitSpecialization = true;
  >    } else if (TUK != TUK_Friend) {
  >      Diag(KWLoc, diag::err_template_spec_needs_header)
  >        << FixItHint::CreateInsertion(KWLoc, "template<> ");
  >      TemplateKWLoc = KWLoc;
  > -    isExplicitSpecialization = true;
  >    }
  > ----------------
  > It seems suspicious that `isExplicitSpecialization` is unused from this
  > point onwards, but this needs more checking.
  >
  > ================
  > Comment at: tools/c-index-test/c-index-test.c:1332
  > @@ -1331,3 +1331,3 @@
  >        const char *RootParentName;
  > -      Root = Parent = p;
  >        do {
  > ----------------
  > Obviously redundant, removed in r203169.
  >
  > ================
  > Comment at: utils/TableGen/NeonEmitter.cpp:765
  > @@ -764,3 +764,2 @@
  >      usgn = false;
  > -    poly = false;
  >      type = 'v';
  > ----------------
  > I don't know if `poly` is supposed to be unused from this point onwards,
  > but even if so, this dead store could make the code robust against future
  > changes that add later uses of `poly`.
  >
  >
  > http://llvm-reviews.chandlerc.com/D2882
  >

  Thank you for the feedback and for your time.
  Sorry for that.

http://llvm-reviews.chandlerc.com/D2882



More information about the cfe-commits mailing list