mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 07:41:03 +01:00
Tidy up lint issues. (#3429)
These are manual fixes; mostly from clang-tidy, some from clangd (which notes unused includes). In typed_insts, adding inlline due to misc-definitions-in-headers. Per discussion, clang-tidy is wrong, but inline silences it. For parameter name skew in definition versus declaration, I'm just using the name from the definition. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
eae630a3db
commit
0d618b1278
@@ -47,8 +47,9 @@ auto NodeKind::child_count() const -> int32_t {
|
||||
return child_count;
|
||||
}
|
||||
|
||||
void CheckNodeMatchesLexerToken(NodeKind node_kind, Lex::TokenKind token_kind,
|
||||
bool has_error) {
|
||||
// NOLINTNEXTLINE(readability-function-size): It's hard to extract macros.
|
||||
auto CheckNodeMatchesLexerToken(NodeKind node_kind, Lex::TokenKind token_kind,
|
||||
bool has_error) -> void {
|
||||
switch (node_kind) {
|
||||
// Use `CARBON_LOG CARBON_ANY_TOKEN` to discover which combinations happen
|
||||
// in practice.
|
||||
@@ -69,9 +70,9 @@ void CheckNodeMatchesLexerToken(NodeKind node_kind, Lex::TokenKind token_kind,
|
||||
MatchActions \
|
||||
}
|
||||
|
||||
#define CARBON_CASE(Name, MatchActions) \
|
||||
case NodeKind::Name: \
|
||||
MatchActions; \
|
||||
#define CARBON_CASE(Name, MatchActions) \
|
||||
case NodeKind::Name: \
|
||||
MatchActions; /* NOLINT(bugprone-macro-parentheses) */ \
|
||||
break;
|
||||
|
||||
#define CARBON_PARSE_NODE_KIND_BRACKET(Name, BracketName, MatchActions) \
|
||||
|
||||
Reference in New Issue
Block a user