[clang-tools-extra] a0ff8cd - [clangd] Reapply b60896fad926 Fall back to selecting token-before-cursor if token-after-cursor fails.

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 16 09:48:41 PST 2019



Sam McCall wrote:

>LOG: [clangd] Reapply b60896fad926 Fall back to selecting
token-before-cursor if token-after-cursor fails.
>
>This reverts commit 8f876d5105507f874c0fb86bc779c9853eab3fe2.

I believe this has caused a significant number of build bot failures,
with error messages along these lines:
(see
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/28908/steps/build%20stage%201/logs/stdio
)


In file included from /usr/include/c++/7/memory:64:0,

from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/llvm/include/llvm/ADT/Optional.h:22,


from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/../clang-tidy/ClangTidyOptions.h:13,


from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.h:12,


from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.cpp:9:

/usr/include/c++/7/bits/stl_construct.h: In instantiation of 'void
std::_Construct(_T1*, _Args&& ...) [with _T1 =
clang::clangd::Tweak::Selection; _Args = {const
clang::clangd::Tweak::Selection&}]':
/usr/include/c++/7/bits/stl_uninitialized.h:83:18:   required from 'static
_ForwardIterator
std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy
(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator =
__gnu_cxx::__normal_iterator<const clang::clangd::Tweak::Selection*,
std::vector<clang::clangd::Tweak::Selection> >; _ForwardIterator =
clang::clangd::Tweak::Selection*; bool _TrivialValueTypes = false]'
/usr/include/c++/7/bits/stl_uninitialized.h:134:15:   required from
'_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator,
_ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const
clang::clangd::Tweak::Selection*,
std::vector<clang::clangd::Tweak::Selection> >; _ForwardIterator =
clang::clangd::Tweak::Selection*]'
/usr/include/c++/7/bits/stl_uninitialized.h:289:37:   required from
'_ForwardIterator std::__uninitialized_copy_a(_InputIterator,
_InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with
_InputIterator = __gnu_cxx::__normal_iterator<const
clang::clangd::Tweak::Selection*,
std::vector<clang::clangd::Tweak::Selection> >; _ForwardIterator =
clang::clangd::Tweak::Selection*; _Tp = clang::clangd::Tweak::Selection]'
/usr/include/c++/7/bits/stl_vector.h:331:31:   required from
'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with
_Tp = clang::clangd::Tweak::Selection; _Alloc =
std::allocator<clang::clangd::Tweak::Selection>]'
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/llvm/include/llvm/Support/Error.h:483:5:
   required from 'llvm::Expected<T>::Expected(OtherT&&, typename
std::enable_if<std::is_convertible<OtherT, T>::value>::type*) [with OtherT
= std::vector<clang::clangd::Tweak::Selection>&; T =
std::vector<clang::clangd::Tweak::Selection>; typename
std::enable_if<std::is_convertible<OtherT, T>::value>::type = void]'
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.cpp:394:10:
   required from here
/usr/include/c++/7/bits/stl_construct.h:75:7: error: use of deleted
function 'clang::clangd::Tweak::Selection::Selection(const
clang::clangd::Tweak::Selection&)'
     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>
(__args)...); }
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included
from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.h:28:0,


from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.cpp:9:

/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/refactor/Tweak.h:49:10:
 note: 'clang::clangd::Tweak::Selection::Selection(const
clang::clangd::Tweak::Selection&)' is implicitly deleted because the
default definition would be ill-formed:
   struct Selection {
          ^~~~~~~~~
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/refactor/Tweak.h:49:10:
 error: use of deleted function
'clang::clangd::SelectionTree::SelectionTree(const
clang::clangd::SelectionTree&)'
In file included
from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/refactor/Tweak.h:25:0,


from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.h:28,


from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/ClangdServer.cpp:9:

/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang-tools-extra/clangd/Selection.h:96:3:
 note: declared here
   SelectionTree(const SelectionTree &) = delete;
   ^~~~~~~~~~~~~


Bye,
Ulrich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191216/a2a006f8/attachment.html>


More information about the cfe-commits mailing list