[Lldb-commits] [lldb] r296717 - Fix various warnings. NFC

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 2 08:00:58 PST 2017


Interesting. Another workaround is probably to make it constexpr
On Thu, Mar 2, 2017 at 7:50 AM Pavel Labath <labath at google.com> wrote:

> FAILED: C:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe   /nologo /TP
> -DGTEST_HAS_RTTI=0 -DLLDB_DISABLE_CURSES -DLLDB_DISABLE_LIBEDIT
> -DLLDB_PYTHON_HOME=\"C:/Users/lldb_build/ll/prebuilts/python-2015/x86\"
> -DLLDB_USE_BUILTIN_DEMANGLER -DLLVM_BUILD_GLOBAL_ISEL -DUNICODE
> -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
> -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
> -D_FILE_OFFSET_BITS=64 -D_HAS_EXCEPTIONS=0 -D_LARGEFILE_SOURCE
> -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> -Itools\lldb\source\Commands
> -IC:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\Commands
> -IC:\lldbSlave\lldb-win7-android\llvm\tools\lldb\include
> -Itools\lldb\include -Iinclude
> -IC:\lldbSlave\lldb-win7-android\llvm\include
> -IC:\Users\lldb_build\ll\prebuilts\python-2015\x86\Include
> -IC:\lldbSlave\lldb-win7-android\llvm\tools\clang\include
> -Itools\lldb\..\clang\include
> -IC:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\. /DWIN32
> /D_WINDOWS   /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267
> -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459
> -wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505
> -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703
> -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319
> -wd4324 -w14062 -we4238 /Zc:inline /Zc:strictStrings /Oi
> /Zc:rvalueCast /MD /O2 /Ob2 /D NDEBUG   -wd4018 -wd4068 -wd4150
> -wd4251 -wd4521 -wd4530  /EHs-c- /GR- /showIncludes
>
> /Fotools\lldb\source\Commands\CMakeFiles\lldbCommands.dir\CommandObjectFrame.cpp.obj
> /Fdtools\lldb\source\Commands\CMakeFiles\lldbCommands.dir\ /FS -c
>
> C:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\Commands\CommandObjectFrame.cpp
>
> C:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\Commands\CommandObjectFrame.cpp(202):
> error C3493: 'qualify_cxx_base_classes' cannot be implicitly captured
> because no default capture mode has been specified
> ninja: build stopped: subcommand failed.
>
>
> Basically, clang and gcc are perfectly happy with you referencing a
> const variable (maybe it has to be of integral type) from a lambda
> without an explicit capture (a behavior which actually quite surprises
> me), but MSVC chokes on that.
>
> The compiler is MSCV 2015, but I don't know which update. This is its
> ident string, if that means anything to you:
> Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86
>
>
>
> On 2 March 2017 at 15:18, Zachary Turner <zturner at google.com> wrote:
> > What capture does it say is missing? Also what version of msvc?
> >
> > On Thu, Mar 2, 2017 at 7:17 AM Zachary Turner <zturner at google.com>
> wrote:
> >>
> >> Clang-cl
> >> On Thu, Mar 2, 2017 at 2:51 AM Pavel Labath <labath at google.com> wrote:
> >>>
> >>>
> >>> On 2 March 2017 at 00:05, Zachary Turner via lldb-commits
> >>> <lldb-commits at lists.llvm.org> wrote:
> >>>>
> >>>> -    DumpValueObjectOptions::DeclPrintingHelper helper =
> >>>> -        [&valobj_sp, qualify_cxx_base_classes](
> >>>> -            ConstString type, ConstString var,
> >>>> -            const DumpValueObjectOptions &opts, Stream &stream) ->
> bool
> >>>> {
> >>>> +    DumpValueObjectOptions::DeclPrintingHelper helper = [&valobj_sp](
> >>>> +        ConstString type, ConstString var, const
> DumpValueObjectOptions
> >>>> &opts,
> >>>> +        Stream &stream) -> bool {
> >>>>        const ValueObject::GetExpressionPathFormat format =
> ValueObject::
> >>>
> >>>
> >>> Hi Zach,
> >>>
> >>> what's the compiler that was giving you this warning. The version of
> MSVC
> >>> I am using is complaining about a missing capture when you removed
> this.
> >>>
> >>> I've updated the code in a way which should make both compilers
> >>> satisfied, but I'd like to know if we are using an unsupported version
> of
> >>> MSVC or something.
> >>>
> >>> cheers,
> >>> pl
> >>>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170302/95569f8b/attachment.html>


More information about the lldb-commits mailing list