<div dir="ltr">Awesome, thanks!<div>Let me know if I can be of any more help.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 25, 2019 at 5:30 PM Louis Dionne <<a href="mailto:ldionne.2@gmail.com">ldionne.2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I was able to reproduce the failure. I don't understand it yet but it looks like we might have exposed a Clang bug. FWIW, here's the repro:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div class="gmail_default"><div class="gmail_default"><font face="monospace">#include <utility></font></div></div></div></div><div><div><div class="gmail_default"><div class="gmail_default"><font face="monospace">#include <type_traits></font></div></div></div></div><div><div><div class="gmail_default"><div class="gmail_default"><font face="monospace"><br></font></div></div></div></div><div><div><div class="gmail_default"><div class="gmail_default"><font face="monospace">struct Base { };</font></div></div></div></div><div><div><div class="gmail_default"><div class="gmail_default"><font face="monospace">struct Derived : Base { protected: Derived() = default; };</font></div></div></div></div><div><div><div class="gmail_default"><div class="gmail_default"><font face="monospace">static_assert(!std::is_default_constructible<std::pair<Derived, int> >::value, "");</font></div></div></div></div></blockquote><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default"><br></div><div class="gmail_default">Louis</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 25, 2019 at 5:18 AM Ilya Biryukov <<a href="mailto:ibiryukov@google.com" target="_blank">ibiryukov@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Reverted in r372832.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 25, 2019 at 11:00 AM Ilya Biryukov <<a href="mailto:ibiryukov@google.com" target="_blank">ibiryukov@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'll have to revert the change to unbreak our integrate.<div>Sorry about the inconvenience.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 25, 2019 at 10:41 AM Ilya Biryukov <<a href="mailto:ibiryukov@google.com" target="_blank">ibiryukov@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Louis,<div><br></div><div>I'm seeing compilation failures while trying to compile clang with libc++ after r372777.</div><div>This is blocking our integrates.<br></div><div><br></div><div></div><div></div><div>Checking for implicitly default-constructible types results in errors coming from access-checking.</div><div>I would expect this shouldn't happen, given that the check is done in SFINAE context.<br></div><div>Is there a quick workaround? Should we revert the change until it's found?</div><div><br></div><div>Here is the compilation error itself:</div><div><br>.../include/c++/v1/type_traits:2820:110: error: calling a protected constructor of class 'clang::ento::Loc'<br>struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({}))><br> ^<br>.../include/c++/v1/utility:350:18: note: in instantiation of template class 'std::__u::__is_implicitly_default_constructible<clang::ento::Loc, void>' requested here<br> return __is_implicitly_default_constructible<_U1>::value<br> ^<br>.../include/c++/v1/utility:341:19: note: in instantiation of function template specialization 'std::__u::pair<clang::ento::Loc, clang::ento::SVal>::_CheckArgs::__enable_implicit_default<clang::ento::Loc, clang::ento::SVal>' requested here<br> && !__enable_implicit_default<_U1, _U2>();<br> ^<br>.../include/c++/v1/utility:403:45: note: in instantiation of function template specialization 'std::__u::pair<clang::ento::Loc, clang::ento::SVal>::_CheckArgs::__enable_explicit_default<clang::ento::Loc, clang::ento::SVal>' requested here<br> _CheckArgsDep<_Dummy>::template __enable_explicit_default<_T1, _T2>()<br> ^<br>.../include/c++/v1/utility:406:5: note: while substituting prior template arguments into non-type template parameter [with _Dummy = true]<br> pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>../include/c++/v1/utility:297:29: note: while substituting deduced template arguments into function template 'pair' [with _Dummy = (no value), $1 = (no value)]<br>struct _LIBCPP_TEMPLATE_VIS pair<br> ^<br>third_party/llvm/llvm/include/llvm/Support/type_traits.h:90:7: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)<br>union trivial_helper {<br> ^<br>third_party/llvm/llvm/include/llvm/Support/type_traits.h:176:40: note: in instantiation of static data member 'llvm::is_trivially_copyable<std::__u::pair<clang::ento::Loc, clang::ento::SVal> >::has_trivial_move_constructor' requested here<br> (has_deleted_move_constructor || has_trivial_move_constructor) &&<br> ^<br>third_party/llvm/llvm/include/llvm/ADT/SmallVector.h:178:56: note: in instantiation of static data member 'llvm::is_trivially_copyable<std::__u::pair<clang::ento::Loc, clang::ento::SVal> >::value' requested here<br>template <typename T, bool = is_trivially_copyable<T>::value><br> ^<br>third_party/llvm/llvm/include/llvm/ADT/SmallVector.h:315:32: note: in instantiation of default argument for 'SmallVectorTemplateBase<std::__u::pair<clang::ento::Loc, clang::ento::SVal> >' required here<br>class SmallVectorImpl : public SmallVectorTemplateBase<T> {<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~<br>third_party/llvm/llvm/include/llvm/ADT/SmallVector.h:837:28: note: in instantiation of template class 'llvm::SmallVectorImpl<std::__u::pair<clang::ento::Loc, clang::ento::SVal> >' requested here<br>class SmallVector : public SmallVectorImpl<T>, SmallVectorStorage<T, N> {<br> ^<br>third_party/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp:51:46: note: in instantiation of template class 'llvm::SmallVector<std::__u::pair<clang::ento::Loc, clang::ento::SVal>, 16>' requested here<br> SmallVector<CallEvent::FrameBindingTy, 16> InitialBindings;<br> ^<br>third_party/llvm/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:322:3: note: declared protected here<br> Loc() = default;</div><div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div>
</blockquote></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div>