Skip to content

Commit 80fa8c1

Browse files
committed
Revert "[cxx-interop] Avoid cycles in ClangTypeExplicitSafety requests"
This reverts commit d0bad4c.
1 parent e9943bc commit 80fa8c1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8844,13 +8844,11 @@ CustomRefCountingOperationResult CustomRefCountingOperation::evaluate(
88448844

88458845
/// Check whether the given Clang type involves an unsafe type.
88468846
static bool hasUnsafeType(Evaluator &evaluator, clang::QualType clangType) {
8847-
auto req = ClangTypeExplicitSafety({clangType});
8848-
if (evaluator.hasActiveRequest(req))
8849-
// If there is a cycle in a type, assume ExplicitSafety is Unspecified,
8850-
// i.e., not unsafe:
8851-
return false;
8852-
return evaluateOrDefault(evaluator, req, ExplicitSafety::Unspecified) ==
8853-
ExplicitSafety::Unsafe;
8847+
8848+
auto safety =
8849+
evaluateOrDefault(evaluator, ClangTypeExplicitSafety({clangType}),
8850+
ExplicitSafety::Unspecified);
8851+
return safety == ExplicitSafety::Unsafe;
88548852
}
88558853

88568854
ExplicitSafety

0 commit comments

Comments
 (0)