It is always better to look for something where you expect it to be.

git-svn-id: http://root.cern.ch/svn/root/trunk@48853 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Vassil Vassilev 2013-03-08 09:54:42 +00:00
parent 3f1bce28bc
commit 26935c507c

View File

@ -133,8 +133,9 @@ namespace cling {
void EvaluateTSynthesizer::Initialize() {
// Most of the declaration we are looking up are in cling::runtime::internal
NamespaceDecl* NSD = utils::Lookup::Namespace(m_Sema, "cling");
NSD = utils::Lookup::Namespace(m_Sema, "runtime", NSD);
NSD = utils::Lookup::Namespace(m_Sema, "internal", NSD);
NamespaceDecl* clingRuntimeNSD
= utils::Lookup::Namespace(m_Sema, "runtime", NSD);
NSD = utils::Lookup::Namespace(m_Sema, "internal", clingRuntimeNSD);
// Find and set up EvaluateT
DeclarationName Name = &m_Context->Idents.get("EvaluateT");
@ -186,9 +187,9 @@ namespace cling {
R.clear();
Name = &m_Context->Idents.get("gCling");
R.setLookupName(Name);
m_Sema->LookupQualifiedName(R, NSD);
m_Sema->LookupQualifiedName(R, clingRuntimeNSD);
m_gCling = R.getAsSingle<VarDecl>();
assert(m_gCling && "clang::DeclContext decl could not be found.");
assert(m_gCling && "gCling decl could not be found.");
// Find and set the source locations to valid ones.
R.clear();