Skip to content

Commit 163f097

Browse files
authored
Merge pull request #82836 from hamishknight/cache-clear
[IDE] Make sure to clear cached CI when `CachedCIShouldBeInvalidated`
2 parents cee2aea + 2b1c82f commit 163f097

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/IDETool/IDEInspectionInstance.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,10 @@ bool IDEInspectionInstance::performCachedOperationIfPossible(
213213

214214
// Check the invalidation first. Otherwise, in case no 'CacheCI' exists yet,
215215
// the flag will remain 'true' even after 'CachedCI' is populated.
216-
if (CachedCIShouldBeInvalidated.exchange(false))
216+
if (CachedCIShouldBeInvalidated.exchange(false)) {
217+
CachedCI = nullptr;
217218
return false;
219+
}
218220
if (!CachedCI)
219221
return false;
220222
if (CachedReuseCount >= Opts.MaxASTReuseCount)

0 commit comments

Comments
 (0)