Skip to content

Commit

Permalink
Fix clang-tidy error in runtime.printer.h (parameter shadows member) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson authored Feb 15, 2024
1 parent 2855ca3 commit d9668c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/runtime/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Checks: >
bugprone-use-after-move,
bugprone-virtual-near-miss,
clang-diagnostic-shadow-field,
misc-confusable-identifiers,
-misc-const-correctness,
-misc-definitions-in-headers,
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ namespace {
template<PrinterType printer_type, uint64_t buffer_length = default_printer_buffer_length>
class HeapPrinter : public PrinterBase {
public:
NEVER_INLINE explicit HeapPrinter(void *user_context)
: PrinterBase(user_context, (char *)malloc(buffer_length), buffer_length) {
NEVER_INLINE explicit HeapPrinter(void *user_context_)
: PrinterBase(user_context_, (char *)malloc(buffer_length), buffer_length) {
if (!start) {
allocation_error();
}
Expand Down Expand Up @@ -247,8 +247,8 @@ class StackPrinter : public PrinterBase {
char scratch[buffer_length];

public:
explicit StackPrinter(void *user_context)
: PrinterBase(user_context, scratch, buffer_length) {
explicit StackPrinter(void *user_context_)
: PrinterBase(user_context_, scratch, buffer_length) {
static_assert(buffer_length <= 256, "StackPrinter is meant only for small buffer sizes; you are probably making a mistake.");
}
};
Expand Down

0 comments on commit d9668c5

Please sign in to comment.