ladybird/Tests/ClangPlugins/LibJSGCTests/missing_member_in_visit_edges.cpp
Matthew Olsson 6a4938a524 ClangPlugins: Convert all warnings to errors
Now that the lambda capture plugin isn't full of false-positives, we can
make the jump and start halting builds for these errors. It also allows
these plugins to be useful in CI.
2024-05-22 21:55:34 -06:00

21 lines
513 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>
class TestClass : public JS::Object {
JS_OBJECT(TestClass, JS::Object);
virtual void visit_edges(Visitor& visitor) override
{
Base::visit_edges(visitor);
}
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
JS::GCPtr<JS::Object> m_object;
};