Skip to content

Commit a8119c5

Browse files
committed
[Gardening] Add an explicit use of an error code
1 parent 3bd0044 commit a8119c5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Driver/DriverIncrementalRanges.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ Optional<SourceRangeBasedInfo> SourceRangeBasedInfo::loadInfoForOnePrimary(
8484
DiagnosticEngine &diags) {
8585

8686
auto removeSupplementaryPaths = [&] {
87-
if (auto ec = llvm::sys::fs::remove(compiledSourcePath))
87+
if (auto ec = llvm::sys::fs::remove(compiledSourcePath)) {
88+
(void)ec;
8889
llvm::errs() << "WARNING could not remove: " << compiledSourcePath;
89-
if (auto ec = llvm::sys::fs::remove(swiftRangesPath))
90+
}
91+
if (auto ec = llvm::sys::fs::remove(swiftRangesPath)) {
92+
(void)ec;
9093
llvm::errs() << "WARNING could not remove: " << swiftRangesPath;
94+
}
9195
};
9296

9397
assert(!primaryInputPath.empty() && "Must have a primary to load info.");

0 commit comments

Comments
 (0)