Skip to content

Commit ed06991

Browse files
Axel-Naumanndevajithvs
authored andcommitted
Do not collect DeleteExprs over incremental end-of-TUs (speedup).
1 parent 86995d9 commit ed06991

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Sema/Sema.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,14 +1451,15 @@ void Sema::ActOnEndOfTranslationUnit() {
14511451
}
14521452

14531453
if (!Diags.isIgnored(diag::warn_mismatched_delete_new, SourceLocation())) {
1454-
if (ExternalSource)
1454+
if (ExternalSource && !PP.isIncrementalProcessingEnabled())
14551455
ExternalSource->ReadMismatchingDeleteExpressions(DeleteExprs);
14561456
for (const auto &DeletedFieldInfo : DeleteExprs) {
14571457
for (const auto &DeleteExprLoc : DeletedFieldInfo.second) {
14581458
AnalyzeDeleteExprMismatch(DeletedFieldInfo.first, DeleteExprLoc.first,
14591459
DeleteExprLoc.second);
14601460
}
14611461
}
1462+
DeleteExprs.clear();
14621463
}
14631464

14641465
AnalysisWarnings.IssueWarnings(Context.getTranslationUnitDecl());

0 commit comments

Comments
 (0)