This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Declare <compare> operators with the proper visibility attribute
ClosedPublic

Authored by ldionne on Jul 9 2018, 3:27 PM.

Details

Summary

Many operators in <compare> were _defined_ with the proper visibility attribute,
but they were _declared_ without any. This is not a problem until we change the
definition of _LIBCPP_INLINE_VISIBILITY to something that requires the
declaration to be decorated.

I also marked strong_equality::operator weak_equality() as
_LIBCPP_INLINE_VISIBILITY, since it seems like it had been forgotten.

This came up while trying to get rid of __attribute__((__always_inline__))
in favor of __attribute__((internal_linkage)).

Diff Detail

Repository
rL LLVM

Event Timeline

ldionne created this revision.Jul 9 2018, 3:27 PM
EricWF accepted this revision.Jul 9 2018, 4:12 PM

I have a series of libc++ clang-tidy checks in a clang-tool-extra fork. One of them being visibility-attr-not-on-first-decl, perhaps I should try to upstream it.

This revision is now accepted and ready to land.Jul 9 2018, 4:12 PM

I have a series of libc++ clang-tidy checks in a clang-tool-extra fork. One of them being visibility-attr-not-on-first-decl, perhaps I should try to upstream it.

That would be great!

This revision was automatically updated to reflect the committed changes.