-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 9083 |
| Resolution | FIXED |
| Resolved on | Apr 30, 2012 18:41 |
| Version | trunk |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor |
Extended Description
The documentation for clang_getCursorLexicalParent() states that, for declarations in the global scope, the lexical parent is the translation unit itself.
I couldn't reproduce this with any input. Specifically, I tried:
CXChildVisitResult my_visitor(CXCursor parent, CXCursor cursor, CXClientData d)
{
ASGTranslator translator = static_cast<ASGTranslator>(d);
CXCursor tu = clang_getTranslationUnitCursor(translator->tu_);
CXCursor lp = clang_getCursorLexicalParent(c);
std::cout << "lexical parent equals TU :" << clang_equalCursors(lp, tu) << std::endl;
}
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"