diff options
author | Itamar <itamar8910@gmail.com> | 2021-05-30 23:20:04 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-01 22:20:13 +0200 |
commit | b5da0b71e51994bac5dad46c5cc3e6a80da87a00 (patch) | |
tree | 872cb3f1637c83cdbfee213097a0feaa5b41bf49 | |
parent | ab79599a5ef01ea4015731e01c0348b6b7de0024 (diff) | |
download | serenity-b5da0b71e51994bac5dad46c5cc3e6a80da87a00.zip |
LibCpp: Consider declarations inside a function's body
... in FunctionDeclaration::declarations()
-rw-r--r-- | Userland/Libraries/LibCpp/AST.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<Declaration> FunctionDeclaration::declarations() const for (auto& arg : m_parameters) { declarations.append(arg); } + + if (m_definition) + declarations.append(m_definition->declarations()); + return declarations; } |