Skip to content

Commit c497bab

Browse files
committed
[cxx-interop] Fix assertion failure when emitting a module interface
``` Assertion failed: (LHS.isValid() && RHS.isValid() && "Passed invalid source location!"), function isBeforeInTranslationUnit, file SourceManager.cpp, line 1991. ``` rdar://118572078
1 parent 98e65d0 commit c497bab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,13 +2710,13 @@ namespace {
27102710
ctorUsingShadowDecl->getTargetDecl());
27112711
if (!baseCtorDecl || baseCtorDecl->isDeleted())
27122712
continue;
2713+
auto loc = ctorUsingShadowDecl->getLocation();
2714+
27132715
auto derivedCtorDecl = clangSema.findInheritingConstructor(
2714-
clang::SourceLocation(), baseCtorDecl,
2715-
ctorUsingShadowDecl);
2716+
loc, baseCtorDecl, ctorUsingShadowDecl);
27162717
if (!derivedCtorDecl->isDefined() &&
27172718
!derivedCtorDecl->isDeleted())
2718-
clangSema.DefineInheritingConstructor(
2719-
clang::SourceLocation(), derivedCtorDecl);
2719+
clangSema.DefineInheritingConstructor(loc, derivedCtorDecl);
27202720
}
27212721
}
27222722
}

0 commit comments

Comments
 (0)