From 737756511845c46501935a424488c22c4caec4c0 Mon Sep 17 00:00:00 2001 From: triton Date: Sat, 18 May 2013 16:48:49 +0100 Subject: [PATCH] Since we now process records fully, we also get some undesired declarations that are created automatically by Clang. Long story short, in this case we do not want to process injected class names inside the record since that will lead us to process records twice and insert them in different namespaces. --- src/Parser/Parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index 173e508e..a0d75536 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -323,6 +323,8 @@ CppSharp::Class^ Parser::WalkRecordCXX(clang::CXXRecordDecl* Record) using namespace clang; using namespace clix; + if (Record->isInjectedClassName()) + return nullptr; auto NS = GetNamespace(Record); assert(NS && "Expected a valid namespace");