From 22dd716b7335d41fb903278ca03edc58724907a6 Mon Sep 17 00:00:00 2001 From: zoecarver Date: Wed, 29 Mar 2023 18:15:22 -0700 Subject: [PATCH] [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. --- include/swift/ClangImporter/ClangImporterRequests.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/swift/ClangImporter/ClangImporterRequests.h b/include/swift/ClangImporter/ClangImporterRequests.h index 14833a0595e10..2dd6441a0b28b 100644 --- a/include/swift/ClangImporter/ClangImporterRequests.h +++ b/include/swift/ClangImporter/ClangImporterRequests.h @@ -413,13 +413,10 @@ SourceLoc extractNearestSourceLoc(SafeUseOfCxxDeclDescriptor desc); class IsSafeUseOfCxxDecl : public SimpleRequest { + RequestFlags::Uncached> { public: using SimpleRequest::SimpleRequest; - // Caching - bool isCached() const { return true; } - // Source location SourceLoc getNearestLoc() const { return SourceLoc(); };