diag: Remove ICE bug report message
We're about to go into a Chrome Origin Trial, and crbug.com/tint is not the correct place to file Chrome related bugs. Move this message to the tint executable, which is code not used by chrome. Change-Id: Ib33630164fa5d7bec3c581e5eca6ff188921eef8 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60562 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
ecadfc111b
commit
63e7ad699c
|
@ -34,6 +34,16 @@ namespace {
|
||||||
const tint::diag::List& diagnostics) {
|
const tint::diag::List& diagnostics) {
|
||||||
auto printer = tint::diag::Printer::create(stderr, true);
|
auto printer = tint::diag::Printer::create(stderr, true);
|
||||||
tint::diag::Formatter{}.format(diagnostics, printer.get());
|
tint::diag::Formatter{}.format(diagnostics, printer.get());
|
||||||
|
tint::diag::Style bold_red{tint::diag::Color::kRed, true};
|
||||||
|
constexpr const char* please_file_bug = R"(
|
||||||
|
********************************************************************
|
||||||
|
* The tint shader compiler has encountered an unexpected error. *
|
||||||
|
* *
|
||||||
|
* Please help us fix this issue by submitting a bug report at *
|
||||||
|
* crbug.com/tint with the source program that triggered the bug. *
|
||||||
|
********************************************************************
|
||||||
|
)";
|
||||||
|
printer->write(please_file_bug, bold_red);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,6 @@ Formatter::Formatter(const Style& style) : style_(style) {}
|
||||||
void Formatter::format(const List& list, Printer* printer) const {
|
void Formatter::format(const List& list, Printer* printer) const {
|
||||||
State state{printer};
|
State state{printer};
|
||||||
|
|
||||||
bool please_report_bug = false;
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (auto diag : list) {
|
for (auto diag : list) {
|
||||||
state.set_style({});
|
state.set_style({});
|
||||||
|
@ -121,21 +120,6 @@ void Formatter::format(const List& list, Printer* printer) const {
|
||||||
}
|
}
|
||||||
format(diag, state);
|
format(diag, state);
|
||||||
first = false;
|
first = false;
|
||||||
|
|
||||||
if (static_cast<int>(diag.severity) > static_cast<int>(Severity::Error)) {
|
|
||||||
please_report_bug = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (please_report_bug) {
|
|
||||||
state.set_style({Color::kRed, true});
|
|
||||||
state << R"(
|
|
||||||
********************************************************************
|
|
||||||
* The tint shader compiler has encountered an unexpected error. *
|
|
||||||
* *
|
|
||||||
* Please help us fix this issue by submitting a bug report at *
|
|
||||||
* crbug.com/tint with the source program that triggered the bug. *
|
|
||||||
********************************************************************
|
|
||||||
)";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style_.print_newline_at_end) {
|
if (style_.print_newline_at_end) {
|
||||||
|
|
|
@ -188,13 +188,6 @@ TEST_F(DiagFormatterTest, ICE) {
|
||||||
the snail says ???
|
the snail says ???
|
||||||
^^^
|
^^^
|
||||||
|
|
||||||
********************************************************************
|
|
||||||
* The tint shader compiler has encountered an unexpected error. *
|
|
||||||
* *
|
|
||||||
* Please help us fix this issue by submitting a bug report at *
|
|
||||||
* crbug.com/tint with the source program that triggered the bug. *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
)";
|
)";
|
||||||
ASSERT_EQ(expect, got);
|
ASSERT_EQ(expect, got);
|
||||||
}
|
}
|
||||||
|
@ -206,13 +199,6 @@ TEST_F(DiagFormatterTest, Fatal) {
|
||||||
the snail says ???
|
the snail says ???
|
||||||
^^^
|
^^^
|
||||||
|
|
||||||
********************************************************************
|
|
||||||
* The tint shader compiler has encountered an unexpected error. *
|
|
||||||
* *
|
|
||||||
* Please help us fix this issue by submitting a bug report at *
|
|
||||||
* crbug.com/tint with the source program that triggered the bug. *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
)";
|
)";
|
||||||
ASSERT_EQ(expect, got);
|
ASSERT_EQ(expect, got);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue