From d418ec2e23960a93aa61aadeaf9235c6128e7b08 Mon Sep 17 00:00:00 2001 From: marcos henrich Date: Thu, 6 Jun 2013 23:50:23 +0100 Subject: [PATCH] Added HandlePreprocessedEntities call for all entities that doesn't contain yet any preprocessed entity. --- src/Parser/Parser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index b69d64c0..89c9b0f6 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -1804,6 +1804,14 @@ CppSharp::AST::Declaration^ Parser::WalkDeclaration(clang::Decl* D, if (Decl) { + if (Decl->PreprocessedEntities->Count == 0) + { + auto startLoc = GetDeclStartLocation(C.get(), D); + auto endLoc = D->getLocEnd(); + auto range = clang::SourceRange(startLoc, endLoc); + + HandlePreprocessedEntities(Decl, range); + } HandleComments(D, Decl); if (const ValueDecl *VD = dyn_cast_or_null(D))