ladybird/Tests/ClangPlugins/LibJSGCTests/missing_visit_edges_method.cpp

17 lines
457 B
C++
Raw Normal View History

2024-04-16 00:07:30 -03:00
/*
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
2024-04-16 00:07:30 -03:00
#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}}
2024-04-16 00:07:30 -03:00
class TestClass : public JS::Object {
JS_OBJECT(TestClass, JS::Object);
GC::Ptr<JS::Object> m_cell;
2024-04-16 00:07:30 -03:00
};