diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index 2d71e91c..459465e2 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -1725,6 +1725,10 @@ CppSharp::Declaration^ Parser::WalkDeclaration(clang::Decl* D, { auto VD = cast(D); Decl = WalkVariable(VD); + + auto NS = GetNamespace(VD); + Decl->Namespace = NS; + NS->Variables->Add(static_cast(Decl)); break; } // Ignore these declarations since they must have been declared in