[LLVMbugs] [Bug 10868] New: libclang does not respect line directives when reporting source locations
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Sep 6 05:43:42 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10868
Summary: libclang does not respect line directives when
reporting source locations
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: vinay_sajip at yahoo.co.uk
CC: llvmbugs at cs.uiuc.edu
Given a simple file somefile.c with the contents
#123 "dummy.c" 1
static int func()
{
return 0;
}
the source location of the func() definition is reported as line 3 of
somefile.c, whereas it should be line 124 of dummy.c as per the # directive.
The # line is correctly parsed in PPDirectives.cpp and a line note added, but
this is not available via the source location APIs.
This problem means that libclang's source location functionality is not much
use when processing files which have already been pre-processed, say via gcc
-E.
--
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