Fix a new C-style cast clang-tidy error in #3963. (#3965)

This isn't *technically* a C-style cast, but a function-style cast. And
newer versions of `clang-tidy` no longer fire on this code, so it is a
little sad to have to work around. But the version on our build bots
seems old enough to still hit this issue (and possibly some others).

Our merge queue also doesn't seem to catch these reliably, but that's
for a separate PR.
This commit is contained in:
Chandler Carruth authored and GitHub committed 2024-05-21 15:22:47 +00:00
1 parent 8e92d3a3a2
commit 2a39e83779
1 file changed
+2 -1
+2 -1
View File
@@ -187,7 +187,8 @@ static auto ResolveAmbiguousTokenAsDeclaration(Context& context,
case Lex::TokenKind::Package:
// `package.foo` is an expression; any other token after `package` is
// a `package` introducer.
return context.PositionKind(Lookahead(2)) == Lex::TokenKind::Period;
return context.PositionKind(static_cast<Lookahead>(2)) ==
Lex::TokenKind::Period;
default:
return true;