Skip to content

Commit d0df7ca

Browse files
committed
Sema: Add a pretty stack trace entry when checking error handling
1 parent 4f76d25 commit d0df7ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/TypeCheckError.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "swift/AST/DiagnosticsSema.h"
2121
#include "swift/AST/Initializer.h"
2222
#include "swift/AST/Pattern.h"
23+
#include "swift/AST/PrettyStackTrace.h"
2324

2425
using namespace swift;
2526

@@ -1648,6 +1649,10 @@ void TypeChecker::checkFunctionErrorHandling(AbstractFunctionDecl *fn) {
16481649
// by the time we got here.
16491650
if (!fn->hasInterfaceType()) return;
16501651

1652+
#ifndef NDEBUG
1653+
PrettyStackTraceDecl debugStack("checking error handling for", fn);
1654+
#endif
1655+
16511656
CheckErrorCoverage checker(*this, Context::forFunction(fn));
16521657

16531658
// If this is a debugger function, suppress 'try' marking at the top level.

0 commit comments

Comments
 (0)