Browse Source

Merge pull request #247 from tomba/minor-fixes

Minor fixes
pull/249/head
João Matos 11 years ago
parent
commit
5b440d7bb5
  1. 1
      src/CppParser/CppParser.cpp
  2. 4
      src/CppParser/Parser.cpp

1
src/CppParser/CppParser.cpp

@ -6,6 +6,7 @@
************************************************************************/ ************************************************************************/
#include "CppParser.h" #include "CppParser.h"
#include "Parser.h"
namespace CppSharp { namespace CppParser { namespace CppSharp { namespace CppParser {

4
src/CppParser/Parser.cpp

@ -1126,7 +1126,7 @@ DeclarationContext* Parser::GetNamespace(clang::Decl* D,
default: default:
{ {
StringRef Kind = Ctx->getDeclKindName(); 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"); assert(0 && "Unhandled declaration context kind");
} } } }
} }
@ -2456,7 +2456,7 @@ Declaration* Parser::WalkDeclaration(clang::Decl* D,
auto FileName = SM.getFilename(Loc); auto FileName = SM.getFilename(Loc);
auto Offset = SM.getFileOffset(Loc); auto Offset = SM.getFileOffset(Loc);
auto LineNo = SM.getLineNumber(SM.getFileID(Loc), Offset); 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; break;
} }; } };

Loading…
Cancel
Save