getInstantiationLocation: Functions involving Location information

View source: R/clang.R

getInstantiationLocationR Documentation

Functions involving Location information

Description

These functions deal with the location of a CXCursor in a source file. They can retrieve the file line and column number an offset from the beginning of the file of a cursor.

Usage

getLocation(x, type = "Expansion")
getRange(begin, end)
getNullLocation()
isInSystemHeader(location)

Arguments

x

a CXSourceLocation object or an object that can be coerced to this class, e.g. a CXCursor

type

a string, one of Expansion, Instantiation or Presumed

begin,end,location

a CXSourceLocation object

Author(s)

Duncan Temple Lang

References

libclang http://clang.llvm.org/doxygen/group__CINDEX.html

See Also

parseTU getRoutines

Examples

 f = system.file("exampleCode", "fib.c", package = "RCIndex")
 r = getRoutines(f)
 r$fib
 getLocation(r$fib)

omegahat/RClangSimple documentation built on Jan. 17, 2024, 6:27 p.m.