forked from OSchip/llvm-project
When pointing at a type decl reference, ASTLocation is a NamedDeclRef.
llvm-svn: 83099
This commit is contained in:
parent
05677cae08
commit
419e38bbe2
|
@ -513,6 +513,8 @@ CXCursor clang_getCursor(CXTranslationUnit CTUnit, const char *source_name,
|
|||
ASTLocation ALoc = ResolveLocationInAST(CXXUnit->getASTContext(), SLoc);
|
||||
|
||||
Decl *Dcl = ALoc.getParentDecl();
|
||||
if (ALoc.isNamedRef())
|
||||
Dcl = ALoc.AsNamedRef().ND;
|
||||
Stmt *Stm = ALoc.dyn_AsStmt();
|
||||
if (Dcl) {
|
||||
if (Stm) {
|
||||
|
|
Loading…
Reference in New Issue