mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibCpp: Fix Declaration::is_member()
Previously, Declaration::is_member() was just a stub that always returned false. It now works by checking whether the parent ASTNode is a declaration of a struct or a class type.
This commit is contained in:
parent
13aee1b780
commit
36aac14798
Notes:
sideshowbarker
2024-07-17 19:08:16 +09:00
Author: https://github.com/itamar8910
Commit: 36aac14798
Pull-request: https://github.com/SerenityOS/serenity/pull/12335
Reviewed-by: https://github.com/guerinoni
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ public:
|
|||
virtual bool is_class() const { return false; }
|
||||
virtual bool is_function() const { return false; }
|
||||
virtual bool is_namespace() const { return false; }
|
||||
virtual bool is_member() const { return false; }
|
||||
bool is_member() const { return parent() != nullptr && parent()->is_declaration() && verify_cast<Declaration>(parent())->is_struct_or_class(); }
|
||||
StringView name() const { return m_name; }
|
||||
void set_name(StringView name) { m_name = move(name); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue