Skip to content

Commit f6d095d

Browse files
committed
[Sema] Avoid double-diagnosing availability for decl refs.
1 parent 9346ad8 commit f6d095d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3099,7 +3099,8 @@ bool ExprAvailabilityWalker::diagnoseDeclRefAvailability(
30993099
return true;
31003100
}
31013101

3102-
diagnoseDeclAvailability(D, R, call, Where, Flags);
3102+
if (diagnoseDeclAvailability(D, R, call, Where, Flags))
3103+
return true;
31033104

31043105
if (R.isValid()) {
31053106
if (diagnoseSubstitutionMapAvailability(R.Start, declRef.getSubstitutions(),

0 commit comments

Comments
 (0)