Matches const or volatile modified types in C#.
This pattern only matches nodes of type type.
Properties
cvModifiedType produces a record that contains the following properties:
| Name | Type | Description |
|---|---|---|
cvFlags |
list<cvModifierKind> |
A list of the modifier types applied to the matched type |
toType |
enum cvModifierKind |
The type of the object being modified. |
Example
The following pattern:
c matches cvModifiedType {
.cvFlags.contains(`const`);
.toType == charType
};
... matches const char.
This pattern can be used to inspect target code such as the following:
class VolatileTest {
public volatile char c;
};