CodeQL library for C/C++
codeql/cpp-all 0.3.3 (changelog, source)
Search

Class UnknownLocation

A dummy location which is used when something doesn’t have a location in the source code but needs to have a Location associated with it. There may be several distinct kinds of unknown locations. For example: one for expressions, one for statements and one for other program elements.

Import path

import cpp

Direct supertypes

Indirect supertypes

Known direct subtypes

    Inherited predicates

    charLoc

    Holds if this location corresponds to file f and character “offsets” start..end. Note that these are not real character offsets, because we use maxCols to find the length of the longest line and then pretend that all the lines are the same length. However, these offsets are convenient for comparing or sorting locations in a file. For an example, see subsumes.

    from Location
    fullLocationInfo

    Holds if this element is in the specified container. The location spans column startcolumn of line startline to column endcolumn of line endline.

    from Location
    getContainer

    Gets the container corresponding to this location.

    from Location
    getEndColumn

    Gets the 1-based column number (inclusive) where this location ends.

    from Location
    getEndLine

    Gets the 1-based line number (inclusive) where this location ends.

    from Location
    getFile

    Gets the file corresponding to this location, if any.

    from Location
    getStartColumn

    Gets the 1-based column number (inclusive) where this location starts.

    from Location
    getStartLine

    Gets the 1-based line number (inclusive) where this location starts.

    from Location
    hasLocationInfo

    Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

    from Location
    isBefore

    Holds if this comes on a line strictly before l.

    from Location
    isBefore

    Holds if this comes strictly before l. The boolean sameLine is true if l is on the same line as this, but starts at a later column. Otherwise, sameLine is false.

    from Location
    subsumes

    Holds if location l is completely contained within this one.

    from Location
    toString

    Gets a textual representation of this element.

    from Location

    Charpred