Skip to content

Commit df6d501

Browse files
committed
Don't short-circuit TypeRefinementContext building for functions
`buildTypeRefinementContextHierarchyDelayed()` is already guarded behind a request, so it doesn't need its own logic for eliminating redundant computation. Remove that logic, which incorrectly assumed that the TRC was built for a function if the function body has already been parsed.
1 parent d63fe27 commit df6d501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckAvailability.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ void TypeChecker::buildTypeRefinementContextHierarchyDelayed(SourceFile &SF, Abs
11991199
if(!RootTRC)
12001200
return;
12011201

1202-
if (AFD->getBodyKind() != AbstractFunctionDecl::BodyKind::Unparsed)
1202+
if (AFD->getLoc().isInvalid())
12031203
return;
12041204

12051205
// Parse the function body.

0 commit comments

Comments
 (0)