Commit e55461a8 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[parser] Fix build with -wformat-pedantic.

Broken by https://chromium-review.googlesource.com/c/467486/

R=vogelheim@chromium.org

Bug:

Change-Id: Id4353f880f80b48f61a6be1773ebfed16a25e85a
Reviewed-on: https://chromium-review.googlesource.com/468806Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44400}
parent b82c5e76
......@@ -620,8 +620,9 @@ void AstPrinter::PrintLiteralWithModeIndented(const char* info,
PrintLiteralIndented(info, value, true);
} else {
EmbeddedVector<char, 256> buf;
int pos = SNPrintF(buf, "%s (%p) (mode = %s", info, var,
VariableMode2String(var->mode()));
int pos =
SNPrintF(buf, "%s (%p) (mode = %s", info, reinterpret_cast<void*>(var),
VariableMode2String(var->mode()));
SNPrintF(buf + pos, ")");
PrintLiteralIndented(buf.start(), value, true);
}
......
......@@ -1628,7 +1628,7 @@ void PrintVar(int indent, Variable* var) {
PrintF(".%p", reinterpret_cast<void*>(var));
else
PrintName(var->raw_name());
PrintF("; // (%p) ", var);
PrintF("; // (%p) ", reinterpret_cast<void*>(var));
PrintLocation(var);
bool comma = !var->IsUnallocated();
if (var->has_forced_context_allocation()) {
......@@ -1701,7 +1701,8 @@ void Scope::Print(int n) {
function = AsDeclarationScope()->function_var();
}
PrintF(" { // (%p) (%d, %d)\n", this, start_position(), end_position());
PrintF(" { // (%p) (%d, %d)\n", reinterpret_cast<void*>(this),
start_position(), end_position());
if (is_hidden()) {
Indent(n1, "// is hidden\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment