diff --git a/Meta/Lagom/ClangPlugins/LibJSGCPluginAction.cpp b/Meta/Lagom/ClangPlugins/LibJSGCPluginAction.cpp index 6abe108b409..8aa503fd20a 100644 --- a/Meta/Lagom/ClangPlugins/LibJSGCPluginAction.cpp +++ b/Meta/Lagom/ClangPlugins/LibJSGCPluginAction.cpp @@ -34,7 +34,7 @@ private: std::vector m_matches; }; -bool record_inherits_from_cell(clang::CXXRecordDecl const& record) +static bool record_inherits_from_cell(clang::CXXRecordDecl const& record) { if (!record.isCompleteDefinition()) return false; @@ -50,7 +50,7 @@ bool record_inherits_from_cell(clang::CXXRecordDecl const& record) return inherits_from_cell; } -std::vector get_all_qualified_types(clang::QualType const& type) +static std::vector get_all_qualified_types(clang::QualType const& type) { std::vector qualified_types; @@ -98,7 +98,7 @@ struct QualTypeGCInfo { bool base_type_inherits_from_cell { false }; }; -std::optional validate_qualified_type(clang::QualType const& type) +static std::optional validate_qualified_type(clang::QualType const& type) { if (auto const* pointer_decl = type->getAs()) { if (auto const* pointee = pointer_decl->getPointeeCXXRecordDecl()) @@ -141,7 +141,7 @@ std::optional validate_qualified_type(clang::QualType const& typ return {}; } -std::optional validate_field_qualified_type(clang::FieldDecl const* field_decl) +static std::optional validate_field_qualified_type(clang::FieldDecl const* field_decl) { auto type = field_decl->getType(); if (auto const* elaborated_type = llvm::dyn_cast(type.getTypePtr())) @@ -294,7 +294,7 @@ struct CellTypeWithOrigin { LibJSCellMacro::Type type; }; -std::optional find_cell_type_with_origin(clang::CXXRecordDecl const& record) +static std::optional find_cell_type_with_origin(clang::CXXRecordDecl const& record) { for (auto const& base : record.bases()) { if (auto const* base_record = base.getType()->getAsCXXRecordDecl()) { @@ -342,6 +342,7 @@ LibJSGCVisitor::CellMacroExpectation LibJSGCVisitor::get_record_cell_macro_expec } assert(false); + std::unreachable(); } void LibJSGCVisitor::validate_record_macros(clang::CXXRecordDecl const& record)