diff --git a/src/CppParser/CppParser.cpp b/src/CppParser/CppParser.cpp index 91008bfe..68038973 100644 --- a/src/CppParser/CppParser.cpp +++ b/src/CppParser/CppParser.cpp @@ -6,6 +6,7 @@ ************************************************************************/ #include "CppParser.h" +#include "Parser.h" namespace CppSharp { namespace CppParser { diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 69e38686..239b55a9 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -1126,7 +1126,7 @@ DeclarationContext* Parser::GetNamespace(clang::Decl* D, default: { StringRef Kind = Ctx->getDeclKindName(); - printf("Unhandled declaration context kind: %s\n", Kind); + printf("Unhandled declaration context kind: %s\n", Kind.str().c_str()); assert(0 && "Unhandled declaration context kind"); } } } @@ -2456,7 +2456,7 @@ Declaration* Parser::WalkDeclaration(clang::Decl* D, auto FileName = SM.getFilename(Loc); auto Offset = SM.getFileOffset(Loc); auto LineNo = SM.getLineNumber(SM.getFileID(Loc), Offset); - Debug(" %s (line %u)\n", FileName, LineNo); + Debug(" %s (line %u)\n", FileName.str().c_str(), LineNo); break; } };