stringLiteral

Coverity Documentation

Version
latest

Matches all string literals.

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 literal.

Inherits properties from:

Example

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


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