[PATCH] D88964: [clangd] Add a missing include-fixer test for incomplete_type, NFC.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 7 07:04:29 PDT 2020
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/IncludeFixer.cpp:71
switch (Info.getID()) {
+ case diag::err_incomplete_base_class:
case diag::err_incomplete_type:
----------------
nit: maybe revert this change, or put `err_incomplete_type` to the last position to make the list alphabetically ordered.
================
Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:709
ns::X *x;
+ auto& $type[[[]]a] = *x;
x$access[[->]]f();
----------------
should this be `$type[[a]]` ?
================
Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:711
x$access[[->]]f();
+ $nested[[ns::X::]]Nested n;
}
----------------
i don't follow what we gain by this change?
================
Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:715
auto TU = TestTU::withCode(Test.code());
+ TU.ExtraArgs.push_back("-std=c++17");
auto Index = buildIndexWithSymbol(
----------------
why do we need c++17 ?
================
Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:738
+ "Add include \"x.h\" for symbol ns::X"))),
+ AllOf(Diag(Test.range("nested"),
+ "incomplete type 'ns::X' named in nested name specifier"),
----------------
can you move this back to original position ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88964/new/
https://reviews.llvm.org/D88964
More information about the cfe-commits
mailing list