You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A very early commit 98c707b attempts to transfer annotations from each Typedef to its underlying aliased type. The attempt fails if the aliased type already has annotations, or if multiple typedefs alias the same type.
What purpose does annotation transfer serve? I can't think of any reason it's necessary, and it risks causing unintended side effects.
For example, a must-use typedef forces the underlying struct to be must-use as well, which is probably not the original intent -- if the code writer intended for a struct to be must-use, they would annotate the struct as must-use -- not some random typedef (of potentially several) that happens to alias it.
There are no code comments explaining why this behavior is desirable, let alone necessary. There is no pull request associated with the commit that might explain the change, no issue tracking the feature, and no unit tests fail if I disable the code.
The text was updated successfully, but these errors were encountered:
A very early commit 98c707b attempts to transfer annotations from each
Typedef
to its underlying aliased type. The attempt fails if the aliased type already has annotations, or if multiple typedefs alias the same type.What purpose does annotation transfer serve? I can't think of any reason it's necessary, and it risks causing unintended side effects.
For example, a must-use typedef forces the underlying struct to be must-use as well, which is probably not the original intent -- if the code writer intended for a struct to be must-use, they would annotate the struct as must-use -- not some random typedef (of potentially several) that happens to alias it.
There are no code comments explaining why this behavior is desirable, let alone necessary. There is no pull request associated with the commit that might explain the change, no issue tracking the feature, and no unit tests fail if I disable the code.
The text was updated successfully, but these errors were encountered: