Skip to content

Commit 2b126d8

Browse files
committed
no merge: add some debugging for linux.
1 parent 6587a8b commit 2b126d8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3712,6 +3712,17 @@ namespace {
37123712
auto dc = Impl.importDeclContextOf(
37133713
decl, importedName.getEffectiveContext());
37143714

3715+
#ifndef NDEBUG
3716+
if (dc == nullptr) {
3717+
llvm::dbgs() << "No decl context!\n";
3718+
llvm::dbgs() << "Decl: " << importedName.declName.getBaseIdentifier().str() << "\n";
3719+
llvm::dbgs() << "Decl: "; decl->dump();
3720+
llvm::dbgs() << "Efective ctx: "; importedName.getEffectiveContext().DC->dumpAsDecl();
3721+
llvm::dbgs() << "Decl ctx: "; decl->getDeclContext()->dumpAsDecl();
3722+
llvm_unreachable("");
3723+
}
3724+
#endif
3725+
37153726
SmallVector<GenericTypeParamDecl *, 4> genericParams;
37163727
for (auto &param : *decl->getTemplateParameters()) {
37173728
auto genericParamDecl =

0 commit comments

Comments
 (0)