Browse Source

Explicitly qualify clang types in the parser.

pull/266/merge
triton 11 years ago
parent
commit
57bae49b4b
  1. 18
      src/CppParser/Parser.cpp

18
src/CppParser/Parser.cpp

@ -1179,7 +1179,7 @@ TranslationUnit* Parser::GetTranslationUnit(clang::SourceLocation Loc,
{ {
using namespace clang; using namespace clang;
SourceManager& SM = C->getSourceManager(); clang::SourceManager& SM = C->getSourceManager();
if (Loc.isMacroID()) if (Loc.isMacroID())
Loc = SM.getExpansionLoc(Loc); Loc = SM.getExpansionLoc(Loc);
@ -2060,8 +2060,8 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F,
String Mangled = GetDeclMangledName(FD, TargetABI, IsDependent); String Mangled = GetDeclMangledName(FD, TargetABI, IsDependent);
F->Mangled = Mangled; F->Mangled = Mangled;
SourceLocation ParamStartLoc = FD->getLocStart(); clang::SourceLocation ParamStartLoc = FD->getLocStart();
SourceLocation ResultLoc; clang::SourceLocation ResultLoc;
auto FTSI = FD->getTypeSourceInfo(); auto FTSI = FD->getTypeSourceInfo();
if (FTSI) if (FTSI)
@ -2176,8 +2176,8 @@ SourceLocationKind Parser::GetLocationKind(const clang::SourceLocation& Loc)
{ {
using namespace clang; using namespace clang;
SourceManager& SM = C->getSourceManager(); clang::SourceManager& SM = C->getSourceManager();
PresumedLoc PLoc = SM.getPresumedLoc(Loc); clang::PresumedLoc PLoc = SM.getPresumedLoc(Loc);
if(PLoc.isInvalid()) if(PLoc.isInvalid())
return SourceLocationKind::Invalid; return SourceLocationKind::Invalid;
@ -2241,7 +2241,7 @@ Variable* Parser::WalkVariable(clang::VarDecl *VD)
bool Parser::GetDeclText(clang::SourceRange SR, std::string& Text) bool Parser::GetDeclText(clang::SourceRange SR, std::string& Text)
{ {
using namespace clang; using namespace clang;
SourceManager& SM = C->getSourceManager(); clang::SourceManager& SM = C->getSourceManager();
const LangOptions &LangOpts = C->getLangOpts(); const LangOptions &LangOpts = C->getLangOpts();
auto Range = CharSourceRange::getTokenRange(SR); auto Range = CharSourceRange::getTokenRange(SR);
@ -2298,7 +2298,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
if (!MI || MI->isBuiltinMacro() || MI->isFunctionLike()) if (!MI || MI->isBuiltinMacro() || MI->isFunctionLike())
break; break;
SourceManager& SM = C->getSourceManager(); clang::SourceManager& SM = C->getSourceManager();
const LangOptions &LangOpts = C->getLangOpts(); const LangOptions &LangOpts = C->getLangOpts();
auto Loc = MI->getDefinitionLoc(); auto Loc = MI->getDefinitionLoc();
@ -2306,10 +2306,10 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
if (!IsValidDeclaration(Loc)) if (!IsValidDeclaration(Loc))
break; break;
SourceLocation BeginExpr = clang::SourceLocation BeginExpr =
Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts); Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts);
auto Range = CharSourceRange::getTokenRange( auto Range = clang::CharSourceRange::getTokenRange(
BeginExpr, MI->getDefinitionEndLoc()); BeginExpr, MI->getDefinitionEndLoc());
bool Invalid; bool Invalid;

Loading…
Cancel
Save