]> granicus.if.org Git - clang/commitdiff
Delete dead stores
authorFangrui Song <maskray@google.com>
Fri, 12 Jul 2019 14:04:34 +0000 (14:04 +0000)
committerFangrui Song <maskray@google.com>
Fri, 12 Jul 2019 14:04:34 +0000 (14:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365901 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCoroutine.cpp
lib/Lex/Lexer.cpp
lib/Sema/SemaDecl.cpp
lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp

index 9ebd84d308aa5f2bb8b543b32e49ed45372cf93a..c529c4d900c97b9a512204113c34fb5a8afbfc5c 100644 (file)
@@ -204,7 +204,6 @@ static LValueOrRValue emitSuspendExpression(CodeGenFunction &CGF, CGCoroData &Co
     BasicBlock *RealSuspendBlock =
         CGF.createBasicBlock(Prefix + Twine(".suspend.bool"));
     CGF.Builder.CreateCondBr(SuspendRet, RealSuspendBlock, ReadyBlock);
-    SuspendBlock = RealSuspendBlock;
     CGF.EmitBlock(RealSuspendBlock);
   }
 
index 40c63874661118c64e27c5a04ea28c1793f53f29..db53e6bec0440eb26c79ffcacb1d624df9a06135 100644 (file)
@@ -687,7 +687,6 @@ PreambleBounds Lexer::ComputePreamble(StringRef Buffer,
       // We only end up here if we didn't recognize the preprocessor
       // directive or it was one that can't occur in the preamble at this
       // point. Roll back the current token to the location of the '#'.
-      InPreprocessorDirective = false;
       TheTok = HashTok;
     }
 
@@ -3232,7 +3231,7 @@ LexNextToken:
 
   case '\r':
     if (CurPtr[0] == '\n')
-      Char = getAndAdvanceChar(CurPtr, Result);
+      (void)getAndAdvanceChar(CurPtr, Result);
     LLVM_FALLTHROUGH;
   case '\n':
     // If we are inside a preprocessor directive and we see the end of line,
index 1c0c5135a2d1160529f4f68a0d20f2f4d73649ad..b2a0632c6e7f1fdea567ff1261c03328ce6892a0 100644 (file)
@@ -3237,7 +3237,6 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD,
     AdjustedType = Context.adjustFunctionType(AdjustedType, NewTypeInfo);
     New->setType(QualType(AdjustedType, 0));
     NewQType = Context.getCanonicalType(New->getType());
-    NewType = cast<FunctionType>(NewQType);
   }
 
   // If this redeclaration makes the function inline, we may need to add it to
index 6927ba39c0a78e8112daa53d2a9b4f68024bd055..46067ecbca99189342b31716ad7f7f981fe75648 100644 (file)
@@ -753,10 +753,9 @@ void NonLocalizedStringChecker::reportLocalizationError(
   if (isDebuggingContext(C))
     return;
 
-  ExplodedNode *ErrNode = C.getPredecessor();
   static CheckerProgramPointTag Tag("NonLocalizedStringChecker",
                                     "UnlocalizedString");
-  ErrNode = C.addTransition(C.getState(), C.getPredecessor(), &Tag);
+  ExplodedNode *ErrNode = C.addTransition(C.getState(), C.getPredecessor(), &Tag);
 
   if (!ErrNode)
     return;