Repository navigation
Closed
Labels
Language ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Linux x64 5.5.9-1-default - OpenSuse Tumbleweed
- VS Code Version: 1.44.0
- C/C++ Extension Version: 0.27
- Other extensions you installed (and if the issue persists after disabling them):
- Does this issue involve using SSH remote to run the extension on a remote machine?: No
- Description: When enabling C++20 via cppStandard settings, the IntellisenseBreaks when encountering import substring despite not being a valid keyword token
Steps to reproduce
- Enable c++20 in cppStandard settings
- Name a variable "import_xxxx"
- Intellisense breaks, syntax highlight for variables in the source file is missing, and displays an error on the variable "import_xxxx". The error is: could not find module file for module "_xxxx"
Expected behavior
The Intellisense does not fail when encountering variable name beginning with "import" in a source file.
Logs
-------- Diagnostics - 4/9/2020, 2:30:03 PM
Version: 0.27.0
Current Configuration:
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"compilerArgs": [],
"cppStandard": "c++20",
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"${workspaceFolder}/**"
]
}
}
Translation Unit Mappings:
[ /home/gilang/source/v8/src/wasm/module-instantiate.cc ]:
/home/gilang/source/v8/src/wasm/module-instantiate.cc
/home/gilang/source/v8/src/execution/isolate.h
[ /home/gilang/source/v8/test/fuzzer/wasm-compile.cc ]:
/home/gilang/source/v8/test/fuzzer/wasm-compile.cc
/home/gilang/source/v8/src/execution/isolate.h
Translation Unit Configurations:
[ /home/gilang/source/v8/src/wasm/module-instantiate.cc ]:
Process ID: 13364
Memory Usage: 551 MB
Compiler Path: /usr/bin/clang
Includes:
/usr/include/c++/9
/usr/include/c++/9/x86_64-suse-linux
/usr/include/c++/9/backward
/usr/local/include
/usr/lib64/clang/9.0.1/include
/usr/include
/home/gilang/source/v8
/home/gilang/source/v8/build/gen
Standard Version: c++20
IntelliSense Mode: clang-x64
Other Flags:
--clang
--clang_version=90001
[ /home/gilang/source/v8/test/fuzzer/wasm-compile.cc ]:
Process ID: 13531
Memory Usage: 535 MB
Compiler Path: /usr/bin/clang
Includes:
/usr/include/c++/9
/usr/include/c++/9/x86_64-suse-linux
/usr/include/c++/9/backward
/usr/local/include
/usr/lib64/clang/9.0.1/include
/usr/include
/home/gilang/source/v8
/home/gilang/source/v8/build/
/home/gilang/source/v8/include
Standard Version: c++20
IntelliSense Mode: clang-x64
Other Flags:
--clang
--clang_version=90001
Total Memory Usage: 1086 MB
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 62)
cpptools/getDocumentSymbols: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 63)
cpptools/getDocumentSymbols
cpptools/activeDocumentChange: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/textEditorSelectionChange
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 64)
idle loop: reparsing the active document
Checking for syntax errors: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
Queueing IntelliSense update for files in translation unit of: /home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/textEditorSelectionChange
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 65)
cpptools/cpptools_finishUpdateSquiggles
Error squiggle count: 1
Error squiggle count: 1
Update IntelliSense time (sec): 5.417
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 66)
cpptools/activeDocumentChange: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/textEditorSelectionChange
cpptools/textEditorSelectionChange
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 67)
idle loop: reparsing the active document
Checking for syntax errors: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
Queueing IntelliSense update for files in translation unit of: /home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/cpptools_finishUpdateSquiggles
Error squiggle count: 1
Error squiggle count: 1
Update IntelliSense time (sec): 5.327
cpptools/getDiagnostics (id: 68)
terminating child process: 13912
terminating child process: 13913
terminating child process: 13914
terminating child process: 13915
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 69)
cpptools/activeDocumentChange: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/textEditorSelectionChange
idle loop: reparsing the active document
Checking for syntax errors: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
Queueing IntelliSense update for files in translation unit of: /home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/cpptools_finishUpdateSquiggles
Error squiggle count: 1
Error squiggle count: 1
Update IntelliSense time (sec): 5.56
cpptools/getCodeActions: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc (id: 70)
cpptools/activeDocumentChange: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/textEditorSelectionChange
idle loop: reparsing the active document
Checking for syntax errors: file:///home/gilang/source/v8/src/wasm/module-instantiate.cc
Queueing IntelliSense update for files in translation unit of: /home/gilang/source/v8/src/wasm/module-instantiate.cc
cpptools/cpptools_finishUpdateSquiggles
Error squiggle count: 1
Error squiggle count: 1
Update IntelliSense time (sec): 5.592
Screenshots
Additional context
The issue can be seen when browsing Chromium's V8 source code, and is gone when reverting to use C++17
Metadata
Metadata
Assignees
Labels
Language ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.

Activity
sean-mcmanus commentedon Apr 9, 2020
Thanks for reporting this. It's a bug inherited from VS 2019, so I've filed a bug at https://developercommunity.visualstudio.com/content/problem/985100/c-intellisense-with-modules-enabled-incorrectly-gi.html .
sean-mcmanus commentedon Jul 16, 2020
Fixed with 0.29.0.