<div dir="ltr">This is a configuration we should probably cover with a bot. It's super easy to omit visibility attributes on the first declaration, only to apply them to the definition. </div><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 21, 2018 at 12:34 PM Louis Dionne via libcxx-commits <<a href="mailto:libcxx-commits@lists.llvm.org">libcxx-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><br>---------- Forwarded message ----------<br>From: Louis Dionne <<a href="mailto:ldionne@apple.com" target="_blank">ldionne@apple.com</a>><br>To: <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br>Cc: <br>Bcc: <br>Date: Wed, 21 Nov 2018 17:31:55 -0000<br>Subject: [libcxx] r347400 - [libcxx] Make sure operator+ is declared with the right visibility attribute<br>Author: ldionne<br>
Date: Wed Nov 21 09:31:55 2018<br>
New Revision: 347400<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=347400&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=347400&view=rev</a><br>
Log:<br>
[libcxx] Make sure operator+ is declared with the right visibility attribute<br>
<br>
Otherwise, Clang complains about internal_linkage not being applied to the<br>
first declaration of the operator (and rightfully so).<br>
<br>
Modified:<br>
    libcxx/trunk/include/string<br>
<br>
Modified: libcxx/trunk/include/string<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=347400&r1=347399&r2=347400&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=347400&r1=347399&r2=347400&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/include/string (original)<br>
+++ libcxx/trunk/include/string Wed Nov 21 09:31:55 2018<br>
@@ -580,6 +580,7 @@ basic_string<_CharT, _Traits, _Allocator<br>
 operator+(_CharT __x, const basic_string<_CharT,_Traits,_Allocator>& __y);<br>
<br>
 template<class _CharT, class _Traits, class _Allocator><br>
+inline _LIBCPP_INLINE_VISIBILITY<br>
 basic_string<_CharT, _Traits, _Allocator><br>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);<br>
<br>
<br>
<br>
<br><br><br>---------- Forwarded message ----------<br>From: Louis Dionne via libcxx-commits <<a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a>><br>To: <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br>Cc: <br>Bcc: <br>Date: Wed, 21 Nov 2018 09:31:56 -0800 (PST)<br>Subject: [libcxx-commits] [libcxx] r347400 - [libcxx] Make sure operator+ is declared with the right visibility attribute<br>_______________________________________________<br>
libcxx-commits mailing list<br>
<a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits</a><br>
</blockquote></div>