Page MenuHomePhabricator

[clangd] Add -header-insertion=never flag to disable include insertion in code completion
ClosedPublic

Authored by sammccall on Apr 8 2019, 8:11 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Apr 8 2019, 8:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2019, 8:11 AM
ioeric added a comment.Apr 8 2019, 8:18 AM

lg!

clangd/CodeComplete.cpp
1176 ↗(On Diff #194150)

Why optional? In the current implementation, it's always initialized.

sammccall accepted this revision.Apr 10 2019, 4:54 AM
sammccall marked 2 inline comments as done.
sammccall added inline comments.
clangd/CodeComplete.cpp
1176 ↗(On Diff #194150)

Oops, this was left-over from a previous iteration.

This revision is now accepted and ready to land.Apr 10 2019, 4:54 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2019, 5:13 AM
phosek added a subscriber: phosek.Apr 10 2019, 10:07 AM

Our Mac builders have started failing after this change with the following:

[3145/3502] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o
FAILED: tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o 
/b/s/w/ir/cache/goma/client/gomacc /b/s/w/ir/k/cipd/bin/clang++  -DCLANG_VENDOR="\"Fuchsia \"" -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clangd/tool -I/b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool -I/b/s/w/ir/k/llvm-project/clang/include -Itools/clang/include -I/usr/include/libxml2 -Iinclude -I/b/s/w/ir/k/llvm-project/llvm/include -I/b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool/.. -Itools/clang/tools/extra/clangd/tool/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -gline-tables-only   -UNDEBUG  -fno-exceptions -fno-rtti -MD -MT tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o -MF tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o.d -o tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o -c /b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool/ClangdMain.cpp
/b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool/ClangdMain.cpp:474:22: error: use of undeclared identifier 'newXPCTransport'
    TransportLayer = newXPCTransport();
                     ^
1 error generated.

I don't understand why since this change hasn't touched the failing line.

Our Mac builders have started failing after this change with the following:

[3145/3502] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o
FAILED: tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o 
/b/s/w/ir/cache/goma/client/gomacc /b/s/w/ir/k/cipd/bin/clang++  -DCLANG_VENDOR="\"Fuchsia \"" -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clangd/tool -I/b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool -I/b/s/w/ir/k/llvm-project/clang/include -Itools/clang/include -I/usr/include/libxml2 -Iinclude -I/b/s/w/ir/k/llvm-project/llvm/include -I/b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool/.. -Itools/clang/tools/extra/clangd/tool/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -gline-tables-only   -UNDEBUG  -fno-exceptions -fno-rtti -MD -MT tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o -MF tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o.d -o tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o -c /b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool/ClangdMain.cpp
/b/s/w/ir/k/llvm-project/clang-tools-extra/clangd/tool/ClangdMain.cpp:474:22: error: use of undeclared identifier 'newXPCTransport'
    TransportLayer = newXPCTransport();
                     ^
1 error generated.

I don't understand why since this change hasn't touched the failing line.

It has been fixed by rCTE358103

simark added a subscriber: simark.Apr 11 2019, 8:25 AM