-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Direct access of the `.data` member of `NameData` structures are discuraged and `NameStr` should be used instead. Also adding one instance that was missed in #5336.
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Find direct access of data member of a NameData structure | ||
// | ||
// These should use NameStr instead. | ||
|
||
@@ | ||
typedef NameData; | ||
typedef Name; | ||
NameData E; | ||
@@ | ||
- E.data | ||
+ NameStr(E) | ||
|
||
@@ | ||
NameData *E; | ||
@@ | ||
- E->data | ||
+ NameStr(*E) | ||
|
||
@@ | ||
Name E; | ||
@@ | ||
- E->data | ||
+ NameStr(*E) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters