Skip to content

Commit 049c90c

Browse files
author
David Ungar
committed
Print source on error
1 parent 2b093fa commit 049c90c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/AST/ASTScopeSourceRange.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ bool ASTScopeImpl::verifyThatThisNodeComeAfterItsPriorSibling() const {
149149
print(out);
150150
out << "\n***Parent node***\n";
151151
getParent().get()->print(out);
152+
llvm::errs() << "\n\nsource:\n"
153+
<< getSourceManager()
154+
.getRangeForBuffer(
155+
getSourceFile()->getBufferID().getValue())
156+
.str();
152157
abort();
153158
}
154159

0 commit comments

Comments
 (0)