HomePhabricator

Fix MSVC 'implicitly capture' compile error. NFCI.

Description

Fix MSVC 'implicitly capture' compile error. NFCI.

Details

Committed
RKSimonJul 17 2019, 8:31 AM
Parents
rL366338: [clangd] Type hierarchy: don't resolve parents if the client only asked for…
Branches
Unknown
Tags
Unknown

Event Timeline

jsji added a subscriber: jsji.EditedJul 17 2019, 8:33 PM

@RKSimon Looks like this will cause build failure when build with clang + -Werror . Can you have a look? Thanks.

/clang-tools-extra/trunk/clangd/QueryDriverDatabase.cpp
68

This will cause clang warning and error when -Werror is on.

...llvm-project/clang-tools-extra/clangd/QueryDriverDatabase.cpp:68:21: error: lambda capture 'SIS' is not required to be captured for

this use [-Werror,-Wunused-lambda-capture]
             [SIS](llvm::StringRef Line) { return Line.trim() == SIS; });
              ^~~
MaskRay added inline comments.
/clang-tools-extra/trunk/clangd/QueryDriverDatabase.cpp
68

Fixed in r366400

qiucf added a subscriber: qiucf.Jul 17 2019, 10:11 PM
jsji added inline comments.Jul 18 2019, 6:59 AM
/clang-tools-extra/trunk/clangd/QueryDriverDatabase.cpp
68

Thanks @MaskRay.