Skip to content

Commit a13c95d

Browse files
committed
Revert "[cxx-interop] Avoid cycles in ClangDeclExplicitSafety requests"
This reverts commit 929d0d8.
1 parent f98480f commit a13c95d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8759,14 +8759,9 @@ ExplicitSafety ClangTypeExplicitSafety::evaluate(
87598759
if (auto recordDecl = clangType->getAsTagDecl()) {
87608760
// If we reached this point the types is not imported as a shared reference,
87618761
// so we don't need to check the bases whether they are shared references.
8762-
auto req = ClangDeclExplicitSafety({recordDecl, false});
8763-
if (evaluator.hasActiveRequest(req))
8764-
// Cycles are allowed in templates, e.g.:
8765-
// template <typename> class Foo { ... }; // throws away template arg
8766-
// template <typename T> class Bar : Foo<Bar<T>> { ... };
8767-
// We need to avoid them here.
8768-
return ExplicitSafety::Unspecified;
8769-
return evaluateOrDefault(evaluator, req, ExplicitSafety::Unspecified);
8762+
return evaluateOrDefault(evaluator,
8763+
ClangDeclExplicitSafety({recordDecl, false}),
8764+
ExplicitSafety::Unspecified);
87708765
}
87718766

87728767
// Everything else is safe.

0 commit comments

Comments
 (0)