File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -8789,11 +8789,13 @@ CustomRefCountingOperationResult CustomRefCountingOperation::evaluate(
87898789
87908790// / Check whether the given Clang type involves an unsafe type.
87918791static bool hasUnsafeType (Evaluator &evaluator, clang::QualType clangType) {
8792-
8793- auto safety =
8794- evaluateOrDefault (evaluator, ClangTypeExplicitSafety ({clangType}),
8795- ExplicitSafety::Unspecified);
8796- return safety == ExplicitSafety::Unsafe;
8792+ auto req = ClangTypeExplicitSafety ({clangType});
8793+ if (evaluator.hasActiveRequest (req))
8794+ // If there is a cycle in a type, assume ExplicitSafety is Unspecified,
8795+ // i.e., not unsafe:
8796+ return false ;
8797+ return evaluateOrDefault (evaluator, req, ExplicitSafety::Unspecified) ==
8798+ ExplicitSafety::Unsafe;
87978799}
87988800
87998801ExplicitSafety
You can’t perform that action at this time.
0 commit comments