Repository navigation
Closed
Labels
bugSomething isn't working
Description
Version
server 0.0.8
Editor
Visual Studio Code 1.138.0, AI feature turned off
Operating system
Debian Testing (x64) (Linux x64 7.1.12+deb14-amd64)
Build system
xmake
What happened
float rank_device_by_memory(const vk::raii::PhysicalDevice& phy_device) noexcept
{
const auto memory_properties = phy_device.getMemoryProperties();
auto device_local_heaps =
memory_properties.memoryHeaps | std::views::filter([](const vk::MemoryHeap& heap) -> bool {
return (heap.flags & vk::MemoryHeapFlagBits::eDeviceLocal)
== vk::MemoryHeapFlagBits::eDeviceLocal;
});
const auto total_heap_memory_bytes = std::ranges::fold_left(
device_local_heaps | std::views::transform(&vk::MemoryHeap::size),
0,
std::plus()
);
return static_cast<float>(total_heap_memory_bytes) / (1024.0f * 1024.0f);
}Install
vulkan-hppand include<vulkan/vulkan.hpp>and<vulkan/vulkan_raii.hpp>
device_local_heaps cannot be declared as const, while mcppls hints that it can. Original clangd doesn't signal the same warning.
| mcppls | clangd |
|---|---|
![]() |
![]() |
Additional Information
.clang-tidy:
Checks: " modernize-*, bugprone-*, readability-*, performance-*, misc-*,
modernize-use-nodiscard,
cppcoreguidelines-slicing,
cppcoreguidelines-pro-bounds-array-to-pointer-decay,
cppcoreguidelines-pro-bounds-pointer-arithmetic,
cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-rvalue-reference-param-not-moved,
cppcoreguidelines-virtual-class-destructor,
cppcoreguidelines-avoid-capturing-lambda-coroutines,
cppcoreguidelines-no-malloc, cppcoreguidelines-no-suspend-with-lock,
cppcoreguidelines-prefer-member-initializer,
-modernize-use-trailing-return-type, -modernize-loop-convert,
-modernize-replace-auto-ptr, -modernize-use-default-member-init,
-modernize-use-override, -modernize-avoid-c-arrays, -modernize-avoid-bind,
-modernize-type-traits, -modernize-use-using,
-bugprone-narrowing-conversions, -bugprone-std-namespace-modification,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-reserved-identifier, -bugprone-exception-escape,
-bugprone-unchecked-optional-access,
-readability-braces-around-statements, -readability-else-after-return,
-readability-magic-numbers, -readability-identifier-length,
-readability-isolate-declaration, -readability-suspicious-call-argument,
-readability-uppercase-literal-suffix,
-readability-convert-member-functions-to-static, -readability-named-parameter,
-readability-qualified-auto, -readability-math-missing-parentheses,
-performance-no-int-to-ptr,-performance-enum-size,
-misc-non-private-member-variables-in-classes, -misc-no-recursion,
-misc-unused-parameters, -misc-use-anonymous-namespace, -misc-include-cleaner"
CheckOptions:
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.ClassIgnoredRegexp: (promise_type|iterator_concept|value_type|difference_type|reference|pointer)
readability-identifier-naming.AbstractClassCase: CamelCase
readability-identifier-naming.AbstractClassIgnoredRegexp: (promise_type|iterator_concept|value_type|difference_type|reference|pointer)
readability-identifier-naming.TypeAliasCase: CamelCase
readability-identifier-naming.TypeAliasIgnoredRegexp: (promise_type|iterator_concept|value_type|difference_type|reference|pointer)
readability-identifier-naming.StructCase: CamelCase
readability-identifier-naming.StructIgnoredRegexp: (promise_type|iterator_concept|value_type|difference_type|reference|pointer)
readability-identifier-naming.UnionCase: CamelCase
readability-identifier-naming.TypeTemplateParameterCase: CamelCase
readability-identifier-naming.EnumCase: CamelCase
readability-identifier-naming.EnumConstantCase: CamelCase
readability-identifier-naming.ConceptCase: CamelCase
readability-identifier-naming.ConstexprVariableCase: aNy_CasE
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.ClassConstexprCase: aNy_CasE
readability-identifier-naming.FunctionCase: lower_case
readability-identifier-naming.FunctionIgnoredRegexp: ^_+.*
readability-identifier-naming.VariableCase: lower_case
readability-identifier-naming.VariableIgnoredRegexp: ^_+.*
readability-identifier-naming.NamespaceCase: lower_case
readability-identifier-naming.MemberCase: lower_case
readability-identifier-naming.MethodCase: lower_case
.clangd:
Diagnostics:
UnusedIncludes: Strict
MissingIncludes: Strict
clangd configuration:
Hover:
ShowAKA: True
InlayHints:
BlockEnd: False
Designators: True
Enabled: True
ParameterNames: True
DeducedTypes: True
TypeNameLimit: 0
DefaultArguments: True
Index:
StandardLibrary: true
Diagnostics:
# UnusedIncludes: Strict
# MissingIncludes: Strict
Includes:
AnalyzeAngledIncludes: True
IgnoreHeader: [impl/*\.hpp]
ClangTidy:
FastCheckFilter: None
Suppress: [builtin_definition]
CompileFlags:
Add:
[
-Wall,
-Wextra,
-Wno-c99-designator,
-Wno-int-to-pointer-cast,
-Wreorder-init-list,
-Wunreachable-code,
-Wdangling,
-Warray-bounds,
-Xclang,
-fbuiltin-headers-in-system-modules,
]
Remove: [
-mabi=*,
-march=*,
-mcpu=*,
-mtune=*,
-mbranch-cost=*,
-Ibuild/.gens/*/rules/utils/bin2c,
-fmodule-mapper=*,
-fconcepts,
-fcoroutines,
# Cuda
-ccbin=*,
-rdc=*,
-gencode,
arch=*,
]
BuiltinHeaders: QueryDriver
Completion:
AllScopes: true
ArgumentLists: None
HeaderInsertion: IWYU
CodePatterns: None
Documentation:
CommentFormat: Doxygen
Style:
AngledHeaders:
- ".*/vulkan/vulkan.*"
Diagnostic bundle:
mcppls-bundle-20261001T094207.379Z.zip
What you expected
Silent the false warning on mcppls.
Diagnostic bundle
- I attached the diagnostic bundle
Diagnostic report (only if there is no bundle)
Steps to reproduce
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't working



Activity
mcpp-language-server 0.0.9: completion on projects without modules as…
Sunrisepeak commentedon Oct 1, 2026
Thanks for the detailed report and the bundle. 0.0.9 addresses everything in it. It is on Open VSX now; the VS Code Marketplace follows shortly.
The
constwarning ondevice_local_heaps. This is a clang-tidy regression. clang-tidy 23.1, which mcppls bundles, reports it; 22.1.8 does not.filter_viewcaches itsbegin(), so declaring itconstbreaks| std::views::transform(...).FastCheckFilter: None.misc-const-correctnessfor a variable holding a filter, drop_while, chunk_by or split view, or a view built on one. The check's other findings stay.Diagnostics.ClangTidy.CheckOptions: misc-const-correctness.AnalyzeValues: falsein.clangd.Completion slower than plain clangd. I reproduced it on your project's code.
--experimental-modules-support, every completion rescans the file's module dependencies. With vulkan-hpp included, the median went from 82 ms to 254 ms, and the worst case to 869 ms. Headers are affected the same way.import, clangd restarts once with modules support.workers: undefined/ "Value must match regex".mcppls.enginewas a plain setting and also the parent ofmcppls.engine.workers. VS Code drops the child's default in that case. On top of that, the value was never sent to the server.mcppls.engine.nameandmcppls.buildDiscovery.mode. The old names keep working, and VS Code offers once to move yours.engine.workersnow takes effect.xmake "needs libpthread-stubs, libtool downloaded". These are build tools and libraries xmake needs to build
libsdl3from source, because your xmake.lua setssystem = falsefor it. That is why installing them with apt fixed it.xmake fwith theproxy/dotnetkeys xmake itself writes to.xmake/.../xmake.conf. Those made every start fail once and show a misleading "runxmake f -c" notice.The slow first seconds after a restart. Your bundle showed a second server instance starting cold beside one left over from an earlier window.
If anything still looks off with 0.0.9, a new bundle (C++ Modules: Export Diagnostic Bundle, right after reproducing) would help.
Sunrisepeak commentedon Oct 24, 2026
最新0.0.17 已经修复, 可以更新验证, 如有问题可以继续reopen反馈