Skip to content

Commit 4674a87

Browse files
committed
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
1 parent fa49c0b commit 4674a87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Frontend/ASTUnit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ ASTUnit::ASTUnit(bool _MainFileIsAST)
219219
TUKind(TU_Complete), WantTiming(getenv("LIBCLANG_TIMING")),
220220
OwnsRemappedFileBuffers(true),
221221
NumStoredDiagnosticsFromDriver(0),
222-
PreambleRebuildCounter(0), SavedMainFileBuffer(nullptr),
222+
PreambleRebuildCounter(0),
223223
NumWarningsInPreamble(0),
224224
ShouldCacheCodeCompletionResults(false),
225225
IncludeBriefCommentsInCodeCompletion(false), UserFilesAreVolatile(false),
@@ -1026,7 +1026,7 @@ static void checkAndSanitizeDiags(SmallVectorImpl<StoredDiagnostic> &
10261026
/// \returns True if a failure occurred that causes the ASTUnit not to
10271027
/// contain any translation-unit information, false otherwise.
10281028
bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
1029-
SavedMainFileBuffer.reset(nullptr);
1029+
SavedMainFileBuffer.reset();
10301030

10311031
if (!Invocation) {
10321032
delete OverrideMainBuffer;

0 commit comments

Comments
 (0)