Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147260 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ARCMigrate/FileRemapper.cpp b/lib/ARCMigrate/FileRemapper.cpp
index c6e6ce4..39c9aad 100644
--- a/lib/ARCMigrate/FileRemapper.cpp
+++ b/lib/ARCMigrate/FileRemapper.cpp
@@ -61,8 +61,7 @@
std::vector<std::pair<const FileEntry *, const FileEntry *> > pairs;
llvm::OwningPtr<llvm::MemoryBuffer> fileBuf;
- if (llvm::error_code ec = llvm::MemoryBuffer::getFile(infoFile.c_str(),
- fileBuf))
+ if (llvm::MemoryBuffer::getFile(infoFile.c_str(), fileBuf))
return report("Error opening file: " + infoFile, Diag);
SmallVector<StringRef, 64> lines;
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 62c557a..10ec6be 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -2406,7 +2406,7 @@
if (Out.has_error())
return CXSaveError_Unknown;
- if (llvm::error_code ec = llvm::sys::fs::rename(TempPath.str(), File)) {
+ if (llvm::sys::fs::rename(TempPath.str(), File)) {
bool exists;
llvm::sys::fs::remove(TempPath.str(), exists);
return CXSaveError_Unknown;
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index fff68b5..bd97fce 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -785,7 +785,7 @@
Scope::BreakScope | Scope::ContinueScope |
Scope::DeclScope);
- StmtResult Stmt(ParseCompoundStatementBody());
+ ParseCompoundStatementBody();
BodyScope.Exit();
} else {
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 9ae39f1..d9d7f0a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -6527,7 +6527,6 @@
Diag(var->getLocation(), diag::warn_global_constructor)
<< Init->getSourceRange();
- QualType Type = var->getType();
if (var->isConstexpr()) {
llvm::SmallVector<PartialDiagnosticAt, 8> Notes;
if (!var->evaluateValue(Notes) || !var->isInitICE()) {