We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e775d85 commit 1f623f6Copy full SHA for 1f623f6
lib/IDE/CompileInstance.cpp
@@ -294,7 +294,7 @@ void CompileInstance::performSema(
294
if (CI && ArgsHash == CachedArgHash &&
295
CachedReuseCount < Opts.MaxASTReuseCount) {
296
CI->getASTContext().CancellationFlag = CancellationFlag;
297
- if (performCachedSemaIfPossible(DiagC)) {
+ if (!performCachedSemaIfPossible(DiagC)) {
298
// If we compileted cacehd Sema operation. We're done.
299
++CachedReuseCount;
300
return;
@@ -312,6 +312,9 @@ void CompileInstance::performSema(
312
313
}
314
315
+ CI->addDiagnosticConsumer(DiagC);
316
+ SWIFT_DEFER { CI->removeDiagnosticConsumer(DiagC); };
317
+
318
// CI is potentially reusable.
319
CachedArgHash = ArgsHash;
320
0 commit comments