mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 08:48:57 +00:00
Tests: Test that unvisited Templated members are caught by ClangPlugin
Specifically AK::Optional<T> and AK::Variant<...> were of interest in recent issues.
This commit is contained in:
parent
bcb8b06a74
commit
d2857164ea
Notes:
github-actions[bot]
2025-08-23 19:22:07 +00:00
Author: https://github.com/IdanHo
Commit: d2857164ea
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5970
Reviewed-by: https://github.com/gmta ✅
1 changed files with 8 additions and 0 deletions
|
@ -6,6 +6,8 @@
|
|||
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
class ForwardDeclaredObject;
|
||||
|
@ -26,4 +28,10 @@ class TestClass : public JS::Object {
|
|||
|
||||
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
||||
GC::Ptr<ForwardDeclaredObject> m_forward_declared_object;
|
||||
|
||||
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
||||
AK::Optional<GC::Ptr<JS::Object>> m_optional_object;
|
||||
|
||||
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
||||
AK::Variant<Empty, GC::Ptr<JS::Object>> m_variant_object;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue