qtil
advanced-security/qtil-swift 0.0.3
Search

Module LocationToString

A module that provides a way to convert a location to a StringLocation.

This module is parameterized because each language has its own way of representing locations.

Typically, this module should be imported via qtil.lang for the query you are writing, e.g., qtil.cpp or qtil.java, rather than instantiating it with a location signature yourself.

import qtil.cpp

// Selects function names and locations via a string tuple.
from StringTuple tuple, Function f
where tuple = StringTuple::of2(f.getName(), stringLocation(f.getLocation()))
select tuple.getFirst(), tuple.getSecond()

Import path

import qtil.locations.StringLocation

Predicates

stringLocation

Construct a StringLocation from the given location object.

Parameters

LocationLocationSig