Displaying 1 result from an estimated 1 matches for "from_sourc".
Did you mean:
from_source
2013 Dec 12
0
[LLVMdev] [libclang] Python bindings bug.
...ro.
How do I go about submiting a bug against this?
import clang.cindex as cindex
from clang.util import get_cursor,get_cursors
t = cindex.TranslationUnit
options=t.PARSE_DETAILED_PROCESSING_RECORD | t.PARSE_PRECOMPILED_PREAMBLE
src1 ="""
#define TEST 5
"""
tu = t.from_source('t.c',"",unsaved_files=[('t.c',src1)],options=options)
cursor = get_cursor(tu.cursor,'TEST')
tokens = list(cursor.get_tokens())
print tokens[-1].spelling #Prints 5 OK
src2 = """
#define TEST 5
typedef int int8;
"""
tu = t.from_source...