This is an archive of the discontinued LLVM Phabricator instance.

Put type attributes after class keyword
ClosedPublic

Authored by dim on Feb 12 2018, 2:20 PM.

Details

Summary

Compiling <functional> in C++17 or higher mode results in:

functional:2500:1: warning: attribute '__visibility__' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes]
_LIBCPP_TYPE_VIS
^
__config:701:46: note: expanded from macro '_LIBCPP_TYPE_VIS'
#    define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
                                             ^
1 warning generated.

Fix it by putting the attribute after the class keyword.

Event Timeline

dim created this revision.Feb 12 2018, 2:20 PM
EricWF accepted this revision.Feb 12 2018, 3:38 PM
This revision is now accepted and ready to land.Feb 12 2018, 3:38 PM
This revision was automatically updated to reflect the committed changes.