r305902 - Fixed compiler warnings after r305890.
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 21 05:34:27 PDT 2017
Author: ibiryukov
Date: Wed Jun 21 07:34:27 2017
New Revision: 305902
URL: http://llvm.org/viewvc/llvm-project?rev=305902&view=rev
Log:
Fixed compiler warnings after r305890.
Should fix buildbots that pass -Werror.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=305902&r1=305901&r2=305902&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Jun 21 07:34:27 2017
@@ -924,9 +924,6 @@ public:
class ASTUnitPreambleCallbacks : public PreambleCallbacks {
public:
- ASTUnitPreambleCallbacks(llvm::SmallVectorImpl<StoredDiagnostic> &StoredDiags)
- : StoredDiags(StoredDiags) {}
-
unsigned getHash() const { return Hash; }
std::vector<Decl *> takeTopLevelDecls() { return std::move(TopLevelDecls); }
@@ -964,7 +961,6 @@ public:
}
private:
- llvm::SmallVectorImpl<StoredDiagnostic> &StoredDiags;
unsigned Hash = 0;
std::vector<Decl *> TopLevelDecls;
std::vector<serialization::DeclID> TopLevelDeclIDs;
@@ -1259,7 +1255,7 @@ ASTUnit::getMainBufferWithPrecompiledPre
SmallVector<StandaloneDiagnostic, 4> NewPreambleDiagsStandalone;
SmallVector<StoredDiagnostic, 4> NewPreambleDiags;
- ASTUnitPreambleCallbacks Callbacks(NewPreambleDiags);
+ ASTUnitPreambleCallbacks Callbacks;
{
llvm::Optional<CaptureDroppedDiagnostics> Capture;
if (CaptureDiagnostics)
@@ -1282,18 +1278,16 @@ ASTUnit::getMainBufferWithPrecompiledPre
case BuildPreambleError::PreambleIsEmpty:
// Try again next time.
PreambleRebuildCounter = 1;
- break;
+ return nullptr;
case BuildPreambleError::CouldntCreateTargetInfo:
case BuildPreambleError::BeginSourceFileFailed:
case BuildPreambleError::CouldntEmitPCH:
case BuildPreambleError::CouldntCreateVFSOverlay:
// These erros are more likely to repeat, retry after some period.
PreambleRebuildCounter = DefaultPreambleRebuildInterval;
- break;
- default:
- llvm_unreachable("unexpected BuildPreambleError");
+ return nullptr;
}
- return nullptr;
+ llvm_unreachable("unexpected BuildPreambleError");
}
}
More information about the cfe-commits
mailing list