From b5da0b71e51994bac5dad46c5cc3e6a80da87a00 Mon Sep 17 00:00:00 2001 From: Itamar Date: Sun, 30 May 2021 23:20:04 +0300 Subject: LibCpp: Consider declarations inside a function's body ... in FunctionDeclaration::declarations() --- Userland/Libraries/LibCpp/AST.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Libraries/LibCpp/AST.cpp b/Userland/Libraries/LibCpp/AST.cpp index 8fb5cc52cd..344858d7e0 100644 --- a/Userland/Libraries/LibCpp/AST.cpp +++ b/Userland/Libraries/LibCpp/AST.cpp @@ -61,6 +61,10 @@ NonnullRefPtrVector FunctionDeclaration::declarations() const for (auto& arg : m_parameters) { declarations.append(arg); } + + if (m_definition) + declarations.append(m_definition->declarations()); + return declarations; } -- cgit v1.2.3