ladybird/Tests/ClangPlugins/LibJSGCTests/missing_visit_edges_method.cpp
Shannon Booth f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00

16 lines
445 B
C++

/*
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
#include <LibJS/Runtime/Object.h>
// expected-error@+1 {{GC::Cell-inheriting class TestClass contains a GC-allocated member 'm_cell' but has no visit_edges method}}
class TestClass : public JS::Object {
JS_OBJECT(TestClass, JS::Object);
GC::Ptr<JS::Object> m_cell;
};