When retrieving a cursor at a given offset the result is inconsistent when
the offset is within an #include statement
For both below examples I would expect the cursor kind for line 1, column 16
to be CXCursor_InclusionDirective
However,
clang -lclang -L/usr/lib/llvm -o test test.c
A ./test example1.c 1 16
B ./test example2.c 1 16
C ./test example2.c 2 16
Produces:
A 'string.h' (inclusion directive)
B '' (NoDeclFound)
C 'string.h' (inclusion directive)
Further investigation suggests the exact ordering of the inclusion
directives seems to make a difference and
the inconsistent behaviour affects only the filename and occurs only with
<foo.h> and never with "foo.h"
uname -smr
Linux 3.11.10-200.fc19.i686.PAE i686
clang --version
clang version 3.3 (tags/RELEASE_33/final)
Any thoughts?
Dave
# example1.c