Enhance the LookupHelper's findScope to return decls for non enum types.
git-svn-id: http://root.cern.ch/svn/root/trunk@48639 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
8e45223665
commit
58b3a268a6
@ -252,15 +252,15 @@ namespace cling {
|
||||
if (P.getCurToken().getKind() == tok::annot_typename) {
|
||||
ParsedType T = P.getTypeAnnotation(const_cast<Token&>(P.getCurToken()));
|
||||
// Only accept the parse if we consumed all of the name.
|
||||
if (P.NextToken().getKind() == clang::tok::eof) {
|
||||
TypeSourceInfo *TSI = 0;
|
||||
clang::QualType QT = clang::Sema::GetTypeFromParser(T, &TSI);
|
||||
if (const EnumType* ET = QT->getAs<EnumType>()) {
|
||||
EnumDecl* ED = ET->getDecl();
|
||||
TheDecl = ED->getDefinition();
|
||||
*setResultType = QT.getTypePtr();
|
||||
if (P.NextToken().getKind() == clang::tok::eof)
|
||||
if (!T.get().isNull()) {
|
||||
TypeSourceInfo *TSI = 0;
|
||||
clang::QualType QT = clang::Sema::GetTypeFromParser(T, &TSI);
|
||||
if (const TagType* TT = QT->getAs<TagType>()) {
|
||||
TheDecl = TT->getDecl()->getDefinition();
|
||||
*setResultType = QT.getTypePtr();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return TheDecl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user