summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-07-12 14:04:34 +0000
committerFangrui Song <maskray@google.com>2019-07-12 14:04:34 +0000
commit687abbe102538f753758ce3b0f9d6c695c6db1e6 (patch)
tree01f8ffe556771cccd108a2c63270d442ca34abe6
parent7004a8fea0e6bf2d5c963aa7af4e670fb3246e25 (diff)
downloadclang-687abbe102538f753758ce3b0f9d6c695c6db1e6.tar.gz
Delete dead stores
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365901 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGCoroutine.cpp1
-rw-r--r--lib/Lex/Lexer.cpp3
-rw-r--r--lib/Sema/SemaDecl.cpp1
-rw-r--r--lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp3
4 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/CGCoroutine.cpp b/lib/CodeGen/CGCoroutine.cpp
index 9ebd84d308..c529c4d900 100644
--- a/lib/CodeGen/CGCoroutine.cpp
+++ b/lib/CodeGen/CGCoroutine.cpp
@@ -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);
}
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 40c6387466..db53e6bec0 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -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,
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 1c0c5135a2..b2a0632c6e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -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
diff --git a/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp b/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
index 6927ba39c0..46067ecbca 100644
--- a/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
@@ -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;