Closed InspAlgo closed 1 year ago
.clangd/config.yaml
CompileFlags:
Add: [-std=c++20]
Compiler: clang++
Diagnostics:
ClangTidy:
Add: ["*"]
Remove:
[
abseil*,
fuchsia*,
llvmlib*,
zircon*,
altera*,
google-readability-todo,
readability-braces-around-statements,
hicpp-braces-around-statements,
modernize-use-trailing-return-type,
]
Index:
Background: Build
Can you ctrl+click on <source_location>
and take a screenshot of what the header's contents (just the first page seen in the editor) looks like?
Can you ctrl+click on
<source_location>
and take a screenshot of what the header's contents (just the first page seen in the editor) looks like?
Can you ctrl+click on
<source_location>
and take a screenshot of what the header's contents (just the first page seen in the editor) looks like?
It seems I've found a solution. I updated my MSVC version, which is now 14.37.32822. It was previously 14.36.32532, and I noticed there have been changes in the macro definitions.
However, I wonder why, even though I've included -std=c++20
in the clangd.fallbackFlags
parameter, the macro __cpp_consteval
is not available. My current clangd version is 16.0.6
, which should support it, right?
However, I wonder why, even though I've included
-std=c++20
in theclangd.fallbackFlags
parameter, the macro__cpp_consteval
is not available. My current clangd version is16.0.6
, which should support it, right?
https://clang.llvm.org/cxx_status.html shows "clang 17" in the entry for "Immediate functions (consteval)"
Please describe the problem.
For the following code, I have configured C++20 version, which also supports the format syntax. However, clangd does not support the syntax for source_location. I'm using MSVC for compilation, specifying C++20, and as you can see from the screenshot below, the compilation and execution are successful.
As this is not a complete project, but rather a single-file compilation, I haven't configured a
compile_command.json
file. Single-file compilation is more suitable for my current learning of new C++ syntax.settings.json
tasks.json
The version of MSVC is 14.36.32532.launch.json
c_cpp_properties.json
Logs clangd.log
System information Clangd version (from the log, or
clangd --version
):clangd extension version: v0.1.24 Operating system: Windows 11 23H2