Matches expressions that describe other expressions already referenced in the abstract syntax tree (AST).
Note:
Python itself does not generate this pattern: It is a product of the Coverity AST.
This pattern only matches nodes of type expression.
Properties
duplicatedValue produces a record that contains the following property:
| Name | Type | Description |
|---|---|---|
reusedExpression |
expression |
The reused expression |
Inherits properties from:
Example
The following CodeXM pattern matches a reused integer literal expression:
pattern reusedInteger {
duplicatedValue {
.reusedExpression == integerLiteral
}
};