-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode cannot see <ranges> namespaces in Clang 15 #9888
Comments
I'm not reproing the issue. Can you run C/C++: Log Diagnostics and provide the output and/or verify the clang 15 compiler is being used with C++23? |
Also, you could run a command line |
This is 100% reproducible on my machine with the described setup with the attached Test.zip.
Steps to reproduce:
Observed the red squiggly lines. The squiggles appeared after the rebuild. Please note the ranges include location:
This is the output: -------- Diagnostics - 9/22/2022, 9:02:57 AM
Version: 1.12.4
Current Configuration:
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"mergeConfigurations": false,
"compilerPathIsExplicit": false,
"configurationProvider": "ms-vscode.cmake-tools",
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Custom browse configuration:
{
"browsePath": [
"/home/hristo/Projects/ClangTest/src"
],
"compilerPath": "/usr/bin/clang++",
"compilerArgs": [],
"compilerFragments": [
"-g",
"-stdlib=libc++",
"-fexperimental-library",
"-W",
"-Wall",
"-Werror",
"-Wpedantic",
"-std=gnu++2b"
]
}
Custom configurations:
[ /home/hristo/Projects/ClangTest/src/main.cpp ]
{
"includePath": [],
"defines": [],
"compilerPath": "/usr/bin/clang++",
"compilerArgs": [],
"compilerFragments": [
"-g",
"-stdlib=libc++",
"-fexperimental-library",
"-W",
"-Wall",
"-Werror",
"-Wpedantic",
"-std=gnu++2b"
]
}
Translation Unit Mappings:
[ /home/hristo/Projects/ClangTest/src/main.cpp ]:
/home/hristo/Projects/ClangTest/src/main.cpp
Translation Unit Configurations:
[ /home/hristo/Projects/ClangTest/src/main.cpp ]:
Process ID: 6330
Memory Usage: 124 MB
Compiler Path: /usr/bin/clang++
Includes:
/usr/lib/llvm-15/include/c++/v1
/usr/lib/llvm-15/lib/clang/15.0.1/include
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
Standard Version: c++23
IntelliSense Mode: linux-clang-x64
Other Flags:
--clang
--clang_version=150001
Total Memory Usage: 124 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 22051 |
I run this command: |
Should the command be: |
|
Clean reconfigure for *VSCode Clang Debug" CMake preset:
Clean reconfigure for VSCode GCC Debug CMake preset:
|
With the main2.zip file I hit https://developercommunity.visualstudio.com/t/C-IntelliSense-doesnt-recognize-clang/10156062 , which might be the root cause of this bug, but I'm not sure yet. I don't get the error when I remove the |
Also, with the main.zip, I'm getting some "not implemented" error internally -- our C++23 support is still in development so it looks like the system header code is using features we don't support yet. Are you able to repro the issue with C++20? I can try myself later too... |
Ah, okay -- I got the repro now -- I didn't have libc++ installed. I'm investigating... UPDATE: Looks like we aren't handling "-fexperimental-library" sufficiently -- clang itself gives the same error without that flag. Still investigating... |
@Zingam You should be able to work around the issue via using |
Fixed with 1.13.1: https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.1 |
Type: Bug
I have been playing around with Clang 15 on Linux. I installed it via:
https://apt.llvm.org/
I created the "update-alternatives" manually, etc.
I copy & pasted this piece of code in a test CMake project:
With GCC 12 config:
With Clang 15 config:
Extension version: 1.12.4
VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:12:14.256Z)
OS version: Linux x64 5.15.0-47-generic snap
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: