Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang-tidy error in runtime.printer.h (parameter shadows member) #8074

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading