From ae52dd896370394d9e8af2a7d626f5149d30c938 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 18 Feb 2014 14:02:12 +0000 Subject: [PATCH] Fixed parsing of preprocessed entities for implicit declarations. --- src/CppParser/Parser.cpp | 2 +- src/Parser/Parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 708885c5..f654b6c0 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -2127,7 +2127,7 @@ void Parser::HandleDeclaration(clang::Decl* D, Declaration* Decl) Decl->OriginalPtr = (void*) D; - if (Decl->PreprocessedEntities.empty()) + if (Decl->PreprocessedEntities.empty() && !D->isImplicit()) { if (clang::dyn_cast(D)) { diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index 1f38b137..9d180c3f 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -2151,7 +2151,7 @@ void Parser::HandleDeclaration(clang::Decl* D, CppSharp::AST::Declaration^ Decl) Decl->OriginalPtr = System::IntPtr(D); - if (Decl->PreprocessedEntities->Count == 0) + if (Decl->PreprocessedEntities->Count == 0 && !D->isImplicit()) { if (clang::dyn_cast(D)) {