[LLVMbugs] [Bug 8761] New: clang_getCursorSemanticParent segfaults
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 8 18:28:19 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8761
Summary: clang_getCursorSemanticParent segfaults
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: stefan.seefeld at gmail.com
CC: llvmbugs at cs.uiuc.edu
I'm observing a segmentation fault in clang_getCursorSemanticParent().
The cursor kind is CXCursor_UnexposedDecl. The getDeclContext() call returns 0,
so the following call to cast<Decl>(DC) fails. (Ironically, it's the
"assert(isa<X>(Val) && "...") check itself that causes the error, as it
dereferences Val, which is 0.
Also, a somewhat related issue: The documentation isn't quite clear on what the
returned-value for getCursorSemanticParent() will be for global declarations.
Should it return a null-cursor ? Or the argument itself ?
(I'm trying to write a function that walks up the context stack to build the
fully qualified name for a given declared name.)
Thanks,
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list