diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bc56e03a6..846d26e45 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -313,8 +313,6 @@ quick_lint_js_add_library( quick-lint-js/debug/mongoose.h quick-lint-js/diag/diag-code-list.cpp quick-lint-js/diag/diag-code-list.h - quick-lint-js/diag/diag-list-diag-reporter.cpp - quick-lint-js/diag/diag-list-diag-reporter.h quick-lint-js/diag/diag-list.cpp quick-lint-js/diag/diag-list.h quick-lint-js/diag/diag-reporter.cpp diff --git a/src/quick-lint-js/diag/diag-list-diag-reporter.cpp b/src/quick-lint-js/diag/diag-list-diag-reporter.cpp deleted file mode 100644 index 7c826a246..000000000 --- a/src/quick-lint-js/diag/diag-list-diag-reporter.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2020 Matthew "strager" Glazar -// See end of file for extended copyright information. - -#include -#include -#include - -namespace quick_lint_js { -Diag_List_Diag_Reporter::Diag_List_Diag_Reporter(Memory_Resource* memory) - : diags_(memory) {} - -Diag_List_Diag_Reporter::~Diag_List_Diag_Reporter() = default; - -Diag_List& Diag_List_Diag_Reporter::diags() { return this->diags_; } - -const Diag_List& Diag_List_Diag_Reporter::diags() const { return this->diags_; } - -void Diag_List_Diag_Reporter::report_impl(Diag_Type type, void* diag) { - static constexpr unsigned char diag_sizes[] = { -#define QLJS_DIAG_TYPE_NAME(name) sizeof(::quick_lint_js::name), - QLJS_X_DIAG_TYPE_NAMES -#undef QLJS_DIAG_TYPE_NAME - }; - this->diags_.add_impl(type, diag, - diag_sizes[static_cast(type)]); -} -} - -// quick-lint-js finds bugs in JavaScript programs. -// Copyright (C) 2020 Matthew "strager" Glazar -// -// This file is part of quick-lint-js. -// -// quick-lint-js is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// quick-lint-js is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with quick-lint-js. If not, see . diff --git a/src/quick-lint-js/diag/diag-list-diag-reporter.h b/src/quick-lint-js/diag/diag-list-diag-reporter.h deleted file mode 100644 index daae32169..000000000 --- a/src/quick-lint-js/diag/diag-list-diag-reporter.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2020 Matthew "strager" Glazar -// See end of file for extended copyright information. - -#pragma once - -#include -#include -#include - -namespace quick_lint_js { -// TODO(#1154): Delete this class. -class Diag_List_Diag_Reporter final : public Diag_Reporter { - public: - explicit Diag_List_Diag_Reporter(Memory_Resource* memory); - - ~Diag_List_Diag_Reporter() override; - - Diag_List& diags(); - const Diag_List& diags() const; - - void report(const Diag_List&) override; - void report_impl(Diag_Type type, void* diag) override; - - private: - Diag_List diags_; -}; -} - -// quick-lint-js finds bugs in JavaScript programs. -// Copyright (C) 2020 Matthew "strager" Glazar -// -// This file is part of quick-lint-js. -// -// quick-lint-js is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// quick-lint-js is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with quick-lint-js. If not, see . diff --git a/src/quick-lint-js/diag/diag-list.h b/src/quick-lint-js/diag/diag-list.h index 2e1d52535..afd2eca5e 100644 --- a/src/quick-lint-js/diag/diag-list.h +++ b/src/quick-lint-js/diag/diag-list.h @@ -8,8 +8,6 @@ #include namespace quick_lint_js { -class Diag_List_Diag_Reporter; - // Internally, Diag_List is implemented as a singly linked list. class Diag_List { public: @@ -86,8 +84,6 @@ class Diag_List { Memory_Resource *memory_; Node_Base *first_ = nullptr; Node_Base *last_ = nullptr; - - friend class Diag_List_Diag_Reporter; }; std::ostream &operator<<(std::ostream &, const Diag_List &); diff --git a/src/quick-lint-js/fe/lex.h b/src/quick-lint-js/fe/lex.h index 2428a1755..c9ed20374 100644 --- a/src/quick-lint-js/fe/lex.h +++ b/src/quick-lint-js/fe/lex.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include