Type: LanguageService
Using auto and brace initialization in one statement, causes extension to report following problems with code, even though it compiles fine.
{
"resource": "vscode-intelisense/main.cxx",
"owner": "_generated_diagnostic_collection_name_#0",
"code": "undefined",
"severity": 8,
"message": "cannot deduce 'auto' type",
"startLineNumber": 4,
"startColumn": 5,
"endLineNumber": 4,
"endColumn": 5
}
{
"resource": "vscode-intelisense/main.cxx",
"owner": "_generated_diagnostic_collection_name_#0",
"code": "undefined",
"severity": 8,
"message": "an #include <initializer_list> is needed prior to a use of std::initializer_list, including an implicit use",
"startLineNumber": 4,
"startColumn": 12,
"endLineNumber": 4,
"endColumn": 12
}
- OS and Version:
Linux 4.17.6-1-ARCH
- VS Code Version:
1.24.1 and 1.25.1
- C/C++ Extension Version:
0.17.7
- Clang Version:
6.0.1
To Reproduce
Example:
c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
main.cxx
int main() {
int x {1}; // ok
auto y = 2; // ok
auto z {3}; // vscode shows problems, compiles fine
return 0;
}
Steps to reproduce the behavior:
- Recreate file structure:
vscode-intelisense
|
|-main.cxx
.vscode
|-c_cpp_properties.json
- Open
vscode-intelisense directory in vscode.
- Problems should be visible.
Expected behavior
No problems reported.
Type: LanguageService
Using auto and brace initialization in one statement, causes extension to report following problems with code, even though it compiles fine.
Linux 4.17.6-1-ARCH1.24.1and1.25.10.17.76.0.1To Reproduce
Example:
c_cpp_properties.jsonmain.cxxSteps to reproduce the behavior:
vscode-intelisensedirectory in vscode.Expected behavior
No problems reported.