Skip to content

Commit 22dd716

Browse files
committed
[cxx-interop] Mark clang-related requests as un-cached.
Pointers from clang appear to be unstable in some capacity. My theory is that clang loads one module, then frees its AST when it's done, or maybe just re-allocates the AST at some point. In any case, we cannot cache requests on clang pointers. This should fix the flakeyness issue that we've been seeing for a while.
1 parent 18fd92e commit 22dd716

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

include/swift/ClangImporter/ClangImporterRequests.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,10 @@ SourceLoc extractNearestSourceLoc(SafeUseOfCxxDeclDescriptor desc);
413413

414414
class IsSafeUseOfCxxDecl
415415
: public SimpleRequest<IsSafeUseOfCxxDecl, bool(SafeUseOfCxxDeclDescriptor),
416-
RequestFlags::Cached> {
416+
RequestFlags::Uncached> {
417417
public:
418418
using SimpleRequest::SimpleRequest;
419419

420-
// Caching
421-
bool isCached() const { return true; }
422-
423420
// Source location
424421
SourceLoc getNearestLoc() const { return SourceLoc(); };
425422

0 commit comments

Comments
 (0)