Files
ladybird/Tests/ClangPlugins/LibJSGCTests/missing_visit_edges_method.cpp
2024-05-13 16:50:54 -06:00

17 lines
449 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-warning@+1 {{JS::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);
JS::GCPtr<JS::Object> m_cell;
};