[LLVMbugs] [Bug 10999] New: clang_tokenize fails after reparsing when using precompiled preambles.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Sep 23 08:10:21 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10999
Summary: clang_tokenize fails after reparsing when using
precompiled preambles.
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: Erik.Verbruggen at Me.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7340)
--> (http://llvm.org/bugs/attachment.cgi?id=7340)
test program
For a file starting with a comment or a blank line, libclang has the following
behaviour:
When calling clang_tokenize after clang_parseTranslationUnit, all tokens are
returned. When then calling clang_reparseTranslationUnit and clang_tokenize, no
tokens get returned. In both cases the range is the full file (so starting at
line 1).
When the file starts with a function definition, it works fine. Also, when
turning off precompiled preambles, it also works fine.
Attached is a program (main.cpp) which parses and reparses test.cpp and prints
the number of tokens after both parses. When the first line is removed from
test.cpp, it works fine.
This was tested against r140369.
--
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