This is an archive of the discontinued LLVM Phabricator instance.

[docu] Improve docu of misc-misplaced-const
AbandonedPublic

Authored by AlexanderLanin on Feb 2 2020, 2:52 PM.

Details

Summary

East const makes the problem more obvious. With west const people were telling me the const is on the wrong side.

Also it's time to use using instead of typedef.

Diff Detail

Event Timeline

AlexanderLanin created this revision.Feb 2 2020, 2:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2020, 2:52 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

East const makes the problem more obvious. With west const people were telling me the const is on the wrong side.

I don't see how this makes the problem more obvious and it seems odd to me that we'd mix styles in code and prose. I prefer leaving this as a west const.

I have no opinion about typedef vs using in this spot, but given that the check can be used in C as well as C++, typedef is slightly more portable.

AlexanderLanin abandoned this revision.Feb 3 2020, 12:12 PM

@aaron.ballman I was ready to complain, but you are right. It would make absolutely no sense to move the const, it's just where it should be.