<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 1, 2014, at 10:17 AM, Bob Wilson <<a href="mailto:bob.wilson@apple.com">bob.wilson@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite" style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">On Oct 1, 2014, at 9:22 AM, Agustín K-ballo Bergé <<a href="mailto:kaballo86@hotmail.com">kaballo86@hotmail.com</a>> wrote:<br><br>Hi Argyrios<br><br>On 30/09/2014 10:45 p.m., Argyrios Kyrtzidis wrote:<br><blockquote type="cite">Hi Marshall,<br><br>This seems to have caused a regression with Objective-C++, see the following test case:<br><br>#include <type_traits><br><br>class CXXForwardClass;<br>@class ObjCForwardClass;<br><br>static_assert(std::is_trivially_destructible<CXXForwardClass*>::value == true, "it is true"); // true<br>static_assert(std::is_trivially_destructible<ObjCForwardClass*>::value == true, "it is true"); // false ?<br></blockquote><br>This sounds like a pre-existing issue to me. Does the following test case hold?<br><br>static_assert(std::is_destructible<CXXForwardClass*>::value == true, "it is true"); // true<br>static_assert(std::is_destructible<ObjCForwardClass*>::value == true, "it is true"); // false ?<br></blockquote><br style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">No, that doesn’t work either.</span><br style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><blockquote type="cite"><blockquote type="cite">On Sep 2, 2014, at 9:19 AM, Marshall Clow <<a href="mailto:mclow.lists@gmail.com">mclow.lists@gmail.com</a>> wrote:<br><br>Author: marshall<br>Date: Tue Sep  2 11:19:38 2014<br>New Revision: 216909<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=216909&view=rev">http://llvm.org/viewvc/llvm-project?rev=216909&view=rev</a><br>Log:<br>Fix PR#20834 - 'is_trivially_destructible yeilds wrong answer for arrays of unknown bound' Thanks to K-ballo for the bug report. Update a few of the other tests while we're here, and fix a typo in a test name.<br><br>--- libcxx/trunk/include/type_traits (original)<br>+++ libcxx/trunk/include/type_traits Tue Sep  2 11:19:38 2014<br>@@ -2861,7 +2861,7 @@ template <class _Tp> struct _LIBCPP_TYPE<br>#if __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403)<br><br>template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible<br>-    : public integral_constant<bool, __has_trivial_destructor(_Tp)> {};<br>+    : public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {};<br></blockquote></blockquote><br>This is the relevant change ^. Something that is not destructible cannot be trivially destructible by definition.<br></blockquote><br style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Right, but the issue wasn’t exposed until r216909.</span></blockquote><br></div><div>Interesting (but consistent) behavior here:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">    </span>class CXXForwardClass;</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>@class ObjCForwardClass;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>template <class U></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>void destroy ( U& u ) { u.~U(); }</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>template <class U></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>void test () { U *p = nullptr; destroy<U*>(p); }</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>int main () {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>test<void>();<span class="Apple-tab-span" style="white-space:pre">                         </span>// compiles w/o error</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>test<CXXForwardClass>();<span class="Apple-tab-span" style="white-space:pre">      </span>// compiles w/o error</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>test<ObjCForwardClass>();<span class="Apple-tab-span" style="white-space:pre">     </span>// error.</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>}</div><div><br></div></div>$ totclang11 -ObjC++ junk2.cpp<br>junk2.cpp:39:26: error: member access into incomplete type 'ObjCForwardClass'<br>void destroy ( U& u ) { u.~U(); }<br>                         ^<br>junk2.cpp:50:32: note: in instantiation of function template specialization<br>      'destroy<ObjCForwardClass *>' requested here<br>void test () { U *p = nullptr; destroy<U*>(p); }<br>                               ^<br>junk2.cpp:55:2: note: in instantiation of function template specialization<br>      'test<ObjCForwardClass>' requested here<br>        test<ObjCForwardClass>();<br>        ^<br>junk2.cpp:36:8: note: forward declaration of class here<br>@class ObjCForwardClass;<br>       ^<br>1 error generated.<br><br><br><div>— Marshall</div><div><br></div></body></html>