Skip to content

Commit

Permalink
Fix new clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Sep 23, 2023
1 parent 71f9f70 commit 8c01313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/ast/symbols/BlockSymbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,10 @@ GenerateBlockArraySymbol& GenerateBlockArraySymbol::fromSyntax(Compilation& comp
}

SmallVector<const GenerateBlockSymbol*> entries;
auto createBlock = [&, loc = loc](ConstantValue value, bool isUninstantiated) {
auto createBlock = [&, blockLoc = loc](ConstantValue value, bool isUninstantiated) {
// Spec: each generate block gets their own scope, with an implicit
// localparam of the same name as the genvar.
auto block = compilation.emplace<GenerateBlockSymbol>(compilation, "", loc,
auto block = compilation.emplace<GenerateBlockSymbol>(compilation, "", blockLoc,
(uint32_t)entries.size(),
isUninstantiated);
auto implicitParam = compilation.emplace<ParameterSymbol>(
Expand Down
2 changes: 1 addition & 1 deletion source/ast/types/AllTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ const Type& PackedUnionType::fromSyntax(Compilation& comp, const StructUnionType

// In tagged unions the tag contributes to the total number of packed bits.
if (isTagged && fieldIndex) {
unionType->tagBits = std::bit_width(fieldIndex - 1);
unionType->tagBits = (uint32_t)std::bit_width(fieldIndex - 1);
unionType->bitWidth += unionType->tagBits;
}

Expand Down

0 comments on commit 8c01313

Please sign in to comment.