This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Allow warnStackExhausted to show more info
Needs ReviewPublic

Authored by Mordante on Oct 27 2019, 9:13 AM.

Details

Summary

This allows the caller of the function to add a note about how to fix the stack exhaustion. This can be useful to aid the user. For example it can be used to show a help message for https://bugs.llvm.org/show_bug.cgi?id=14030

Diff Detail

Event Timeline

Mordante created this revision.Oct 27 2019, 9:13 AM

Exact use case? Test?

The use case and its test are in D69479. Is that sufficient?

I sort of feel like we don't want to go this route because we want to avoid calling runWithSufficientStackSpace whenever possible, but I am not strongly opposed to this patch. It should be combined with the usage of the new functionality, however, so that it gets adequate test coverage.

@rsmith also doesn't like the approach runWithSufficientStackSpace in D69479. So I'll try to use a different approach. If that succeeds I have no use case for this patch and will probably abandon it.