[PATCH] Delete various dead assignments

Gautier DI FOLCO gautier.difolco at gmail.com
Tue Feb 25 15:16:29 PST 2014


I have delete all the dead assignments printed by http://buildd-clang.debian.net/scan-build/, but I have kept some of them which seems to be in place for latter work.

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

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
@@ -1953,10 +1953,8 @@
     }
 
     // Check for the 'framework' keyword, which is not permitted here.
-    if (Framework) {
+    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);
     Explicit = false;
Index: lib/Sema/SemaDeclCXX.cpp
===================================================================
--- lib/Sema/SemaDeclCXX.cpp
+++ lib/Sema/SemaDeclCXX.cpp
@@ -11448,12 +11448,10 @@
                                 /*ModulePrivateLoc=*/SourceLocation(),
                                 TempParamLists.size() - 1,
                                 TempParamLists.data()).take();
-    } else {
+    } else
       // The "template<>" header is extraneous.
       Diag(TemplateParams->getTemplateLoc(), diag::err_template_tag_noparams)
         << TypeWithKeyword::getTagTypeKindName(Kind) << Name;
-      isExplicitSpecialization = true;
-    }
   }
 
   if (Invalid) return 0;
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
@@ -1314,7 +1314,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.1.patch
Type: text/x-patch
Size: 3177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140225/5ff47c81/attachment.bin>


More information about the cfe-commits mailing list