mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
6a4938a524
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.
21 lines
624 B
C++
21 lines
624 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/Heap/GCPtr.h>
|
|
#include <LibJS/Heap/MarkedVector.h>
|
|
|
|
struct NotACell { };
|
|
|
|
class TestClass {
|
|
// expected-error@+1 {{Specialization type must inherit from JS::Cell}}
|
|
JS::GCPtr<NotACell> m_member_1;
|
|
// expected-error@+1 {{Specialization type must inherit from JS::Cell}}
|
|
JS::NonnullGCPtr<NotACell> m_member_2;
|
|
// expected-error@+1 {{Specialization type must inherit from JS::Cell}}
|
|
JS::RawGCPtr<NotACell> m_member_3;
|
|
};
|