mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Cleanup or suppress numerous clang-tidy issues. (#577)
This gets us to a nearly clean state across the toolchain. A couple of these are checks that I don't think we want to try to rigidly use and I've disabled them completely. Others I've added relevant `NOLINT` style suppressions or applied the automatic fix suggested by `clang-tidy`. The implicit conversions that are allowed here with `NOLINT` are probably worth at least a tiny bit of scrutiny to see if we could replace the construct with something more direct without undue effort and no longer need the implicit conversion. But until then, it seemed fine to suppress.
This commit is contained in:
@@ -44,7 +44,7 @@ constexpr int8_t NumPrecedenceLevels = Lowest + 1;
|
||||
// A precomputed lookup table determining the relative precedence of two
|
||||
// precedence groups.
|
||||
struct OperatorPriorityTable {
|
||||
constexpr OperatorPriorityTable() : table{} {
|
||||
constexpr OperatorPriorityTable() : table() {
|
||||
// Start with a list of <higher precedence>, <lower precedence>
|
||||
// relationships.
|
||||
MarkHigherThan({Highest}, {NumericPrefix, BitwisePrefix, LogicalPrefix,
|
||||
@@ -310,8 +310,8 @@ auto PrecedenceGroup::ForTrailing(TokenKind kind, bool infix)
|
||||
|
||||
auto PrecedenceGroup::GetPriority(PrecedenceGroup left, PrecedenceGroup right)
|
||||
-> OperatorPriority {
|
||||
static constexpr OperatorPriorityTable lookup;
|
||||
return lookup.table[left.level][right.level];
|
||||
static constexpr OperatorPriorityTable Lookup;
|
||||
return Lookup.table[left.level][right.level];
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user