[LLVMbugs] [Bug 22894] New: Cannot get layout of forward declaration!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 13 05:15:10 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22894
Bug ID: 22894
Summary: Cannot get layout of forward declaration!
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: libclang
Assignee: unassignedclangbugs at nondot.org
Reporter: haxmeadroom at gmail.com
CC: klimek at google.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14041
--> https://llvm.org/bugs/attachment.cgi?id=14041&action=edit
Example c file that causes the crash
Parsing the AST using a RecursiveASTVisitor and attempting to get the type size
causes an assert. Followed the guide at
http://clang.llvm.org/docs/LibASTMatchersTutorial.html , and created a simple
ASTVisitor that eventually calls-
context->getTypeSize( node->getType() ) ;
..which causes this trap
Assertion failed: (D && "Cannot get layout of forward declarations!"), function
getASTRecordLayout, file
/Users/clang-llvm/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp, line 2875.
Abort trap: 6
Attached is the example file that causes the crash.
Setup info
----------
uname: Darwin 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST
2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
git: 99436fd8cdc553eca1997f27ef00db71b897e29c
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150313/511674ae/attachment.html>
More information about the llvm-bugs
mailing list