[PATCH] Delete various dead assignments

Gautier DI FOLCO gautier.difolco at gmail.com
Mon Mar 3 05:29:57 PST 2014


  I have tested it with a newer revision and I have kept the curly brackets.

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

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2882?vs=7360&id=7472#toc

Files:
  lib/AST/CommentCommandTraits.cpp
  lib/Lex/ModuleMap.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaTemplate.cpp
  tools/c-index-test/c-index-test.c
  utils/TableGen/NeonEmitter.cpp

Index: lib/AST/CommentCommandTraits.cpp
===================================================================
--- lib/AST/CommentCommandTraits.cpp
+++ lib/AST/CommentCommandTraits.cpp
@@ -62,7 +62,6 @@
   else if (EditDistance < BestEditDistance) {
     BestCommand.clear();
     BestCommand.push_back(Command);
-    BestEditDistance = EditDistance;
   }
 }
 
Index: lib/Lex/ModuleMap.cpp
===================================================================
--- lib/Lex/ModuleMap.cpp
+++ lib/Lex/ModuleMap.cpp
@@ -1962,7 +1962,6 @@
     // Check for the 'framework' keyword, which is not permitted here.
     if (Framework) {
       Diags.Report(StarLoc, diag::err_mmap_inferred_framework_submodule);
-      Framework = false;
     }
   } else if (Explicit) {
     Diags.Report(StarLoc, diag::err_mmap_explicit_inferred_framework);
Index: lib/Sema/SemaDeclCXX.cpp
===================================================================
--- lib/Sema/SemaDeclCXX.cpp
+++ lib/Sema/SemaDeclCXX.cpp
@@ -11458,7 +11458,6 @@
       // The "template<>" header is extraneous.
       Diag(TemplateParams->getTemplateLoc(), diag::err_template_tag_noparams)
         << TypeWithKeyword::getTagTypeKindName(Kind) << Name;
-      isExplicitSpecialization = true;
     }
   }
 
Index: lib/Sema/SemaTemplate.cpp
===================================================================
--- lib/Sema/SemaTemplate.cpp
+++ lib/Sema/SemaTemplate.cpp
@@ -5929,13 +5929,10 @@
                                 SourceRange(TemplateParams->getTemplateLoc(),
                                             TemplateParams->getRAngleLoc()))
         << 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;
   }
 
   // Check that the specialization uses the same tag kind as the
Index: tools/c-index-test/c-index-test.c
===================================================================
--- tools/c-index-test/c-index-test.c
+++ tools/c-index-test/c-index-test.c
@@ -1329,7 +1329,7 @@
     CXCursor Parent, Root;
     if (clang_getCursorKind(cursor) == CXCursor_FieldDecl ) {
       const char *RootParentName;
-      Root = Parent = p;
+      Parent = p;
       do {
         Root = Parent;
         RootParentName = clang_getCString(clang_getCursorSpelling(Root));
Index: utils/TableGen/NeonEmitter.cpp
===================================================================
--- utils/TableGen/NeonEmitter.cpp
+++ utils/TableGen/NeonEmitter.cpp
@@ -762,7 +762,6 @@
   // All pointers are void* pointers.  Change type to 'v' now.
   if (pntr) {
     usgn = false;
-    poly = false;
     type = 'v';
   }
   // Treat half-float ('h') types as unsigned short ('s') types.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2882.2.patch
Type: text/x-patch
Size: 2874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140303/0f37f01e/attachment.bin>


More information about the cfe-commits mailing list