Skip to content

Commit

Permalink
Fixed compiler warnings after r305890.
Browse files Browse the repository at this point in the history
Should fix buildbots that pass -Werror.

llvm-svn: 305902
  • Loading branch information
ilya-biryukov committed Jun 21, 2017
1 parent b03877a commit f81d46f
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions clang/lib/Frontend/ASTUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,6 @@ class TopLevelDeclTrackerAction : public ASTFrontendAction {

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); }
Expand Down Expand Up @@ -964,7 +961,6 @@ class ASTUnitPreambleCallbacks : public PreambleCallbacks {
}

private:
llvm::SmallVectorImpl<StoredDiagnostic> &StoredDiags;
unsigned Hash = 0;
std::vector<Decl *> TopLevelDecls;
std::vector<serialization::DeclID> TopLevelDeclIDs;
Expand Down Expand Up @@ -1259,7 +1255,7 @@ ASTUnit::getMainBufferWithPrecompiledPreamble(

SmallVector<StandaloneDiagnostic, 4> NewPreambleDiagsStandalone;
SmallVector<StoredDiagnostic, 4> NewPreambleDiags;
ASTUnitPreambleCallbacks Callbacks(NewPreambleDiags);
ASTUnitPreambleCallbacks Callbacks;
{
llvm::Optional<CaptureDroppedDiagnostics> Capture;
if (CaptureDiagnostics)
Expand All @@ -1282,18 +1278,16 @@ ASTUnit::getMainBufferWithPrecompiledPreamble(
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");
}
}

Expand Down

0 comments on commit f81d46f

Please sign in to comment.