stringLiteral

Coverity Documentation

Version
latest

Matches literal strings.

This pattern only matches nodes of type expression.

Properties

stringLiteral produces a record that contains the following property:

Name Type Description
valueString string The value of the string

Inherits properties from:

Example

The following CodeXM pattern finds assignments from the string literal "Example":

CXM code follows
    pattern assignmentsToStringLiterals {
        assignmentOperator {
            .sourceExpression == stringLiteral { .valueString == "Example" }
        }
    };