Small cleanup: Don't duplicate default behavior.

std::unique_ptr is null initialized and reset default to null.

Thanks to David Blaikie for noticing.

llvm-svn: 215560
This commit is contained in:
Rafael Espindola 2014-08-13 17:08:22 +00:00
parent fa49c0bf10
commit 4674a876cd
1 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ ASTUnit::ASTUnit(bool _MainFileIsAST)
TUKind(TU_Complete), WantTiming(getenv("LIBCLANG_TIMING")),
OwnsRemappedFileBuffers(true),
NumStoredDiagnosticsFromDriver(0),
PreambleRebuildCounter(0), SavedMainFileBuffer(nullptr),
PreambleRebuildCounter(0),
NumWarningsInPreamble(0),
ShouldCacheCodeCompletionResults(false),
IncludeBriefCommentsInCodeCompletion(false), UserFilesAreVolatile(false),
@ -1026,7 +1026,7 @@ static void checkAndSanitizeDiags(SmallVectorImpl<StoredDiagnostic> &
/// \returns True if a failure occurred that causes the ASTUnit not to
/// contain any translation-unit information, false otherwise.
bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
SavedMainFileBuffer.reset(nullptr);
SavedMainFileBuffer.reset();
if (!Invocation) {
delete OverrideMainBuffer;