We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9604081 commit 41881a8Copy full SHA for 41881a8
lib/AST/LifetimeDependence.cpp
@@ -359,8 +359,15 @@ class LifetimeDependenceChecker {
359
360
std::optional<llvm::ArrayRef<LifetimeDependenceInfo>> checkEnumElementDecl() {
361
auto *eed = cast<EnumElementDecl>(decl);
362
- auto enumType = eed->getParentEnum()->mapTypeIntoContext(
363
- eed->getParentEnum()->getDeclaredInterfaceType());
+ auto *parentEnum = eed->getParentEnum();
+ auto enumType =
364
+ parentEnum->mapTypeIntoContext(parentEnum->getDeclaredInterfaceType());
365
+
366
+ // Add early bailout for imported enums.
367
+ if (parentEnum->hasClangNode()) {
368
+ return std::nullopt;
369
+ }
370
371
// Escapable enum, bailout.
372
if (!isDiagnosedNonEscapable(enumType)) {
373
return std::nullopt;
0 commit comments