зеркало из https://github.com/microsoft/clang-1.git
Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147260 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
b701d3d0b2
Коммит
8d2a701734
|
@ -61,8 +61,7 @@ bool FileRemapper::initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag,
|
|||
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;
|
||||
|
|
|
@ -2406,7 +2406,7 @@ CXSaveError ASTUnit::Save(StringRef File) {
|
|||
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;
|
||||
|
|
|
@ -785,7 +785,7 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
|
|||
Scope::BreakScope | Scope::ContinueScope |
|
||||
Scope::DeclScope);
|
||||
|
||||
StmtResult Stmt(ParseCompoundStatementBody());
|
||||
ParseCompoundStatementBody();
|
||||
|
||||
BodyScope.Exit();
|
||||
} else {
|
||||
|
|
|
@ -6527,7 +6527,6 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {
|
|||
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()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче