Skip to content

Commit d079892

Browse files
authored
Merge pull request #1726 from Microsoft/master
Merge to release for 0.16.0
2 parents e5976d2 + 56fd1e7 commit d079892

24 files changed

+817
-190
lines changed

Code Samples/SampleClangProject/.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"taskName": "clang++",
7+
"label": "clang++",
88
"command": "clang++ --debug -o main.exe main.cpp",
99
// "--debug" enables debugging symbols
1010
// "-o main.exe" specifies the output executable
@@ -16,4 +16,4 @@
1616
}
1717
}
1818
]
19-
}
19+
}

Documentation/LanguageServer/c_cpp_properties.json.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@
88
{
99
"name": "Win32",
1010
"intelliSenseMode": "msvc-x64",
11-
"includePath": [ "${workspaceRoot}" ],
11+
"includePath": [ "${workspaceFolder}" ],
12+
"macFrameworkPath": [ "/System/Library/Frameworks" ],
1213
"defines": [ "FOO", "BAR=100" ],
14+
"forcedInclude": [ "${workspaceFolder}/include/config.h" ],
15+
"compilerPath": "/usr/bin/clang",
16+
"cStandard": "c11",
17+
"cppStandard": "c++17",
1318
"compileCommands": "/path/to/compile_commands.json",
1419
"browse": {
15-
"path": [ "${workspaceRoot}" ],
20+
"path": [ "${workspaceFolder}" ],
1621
"limitSymbolsToIncludedHeaders": true,
1722
"databaseFilename": ""
1823
}
1924
}
2025
],
21-
"version": 2
26+
"version": 3
2227
}
2328
```
2429

@@ -39,15 +44,30 @@
3944
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this property determines which mode the IntelliSense engine will run in. `"msvc-x64"` maps to Visual Studio mode with 64-bit pointer sizes. `"clang-x64"` maps to GCC/CLang mode with 64-bit pointer sizes. Windows uses `"msvc-x64"` by default and Linux/Mac use `"clang-x64"` by default.
4045

4146
* #### `includePath`
42-
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of paths will be used by IntelliSense to search for headers included by your source files. This is basically the same as the list of paths you pass to your compiler with the `-I` switch; the IntelliSense engine will not do a recursive search in these paths for includes.
47+
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of paths will be used by IntelliSense to search for headers included by your source files. This is basically the same as the list of paths you pass to your compiler with the `-I` switch; the IntelliSense engine will not do a recursive search in these paths for includes. If a GCC/CLang compiler is specified in the `compilerPath` setting, it is not necessary to list the system include paths in this list.
48+
49+
* #### `macFrameworkPath`
50+
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of paths will be used by IntelliSense to search for framework headers included by your source files. This is basically the same as the list of paths you pass to your compiler with the `-F` switch; the IntelliSense engine will not do a recursive search in these paths for includes.
4351

4452
* #### `defines`
4553
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of preprocessor symbols will be used by IntelliSense during the compilation of your source files. This is basically the same as the list of symbols you pass to your compiler with the `-D` switch.
4654

55+
* #### `forcedInclude` (optional)
56+
A list of files that should be included before any other characters in the source file are processed. Files are included in the order listed.
57+
58+
* #### `compilerPath` (optional)
59+
The absolute path to the compiler you use to build your project. The extension will query the compiler to determine the system include paths and default defines to use for IntelliSense. Args can be added to modify the includes/defines used, e.g. `-nostdinc++`, `-m32`, etc., but paths with spaces must be surrounded by double quotes (`"`) if args are used.
60+
61+
* #### `cStandard`
62+
The C standard revision to use for IntelliSense in your project.
63+
64+
* #### `cppStandard`
65+
The C++ standard revision to use for IntelliSense in your project.
66+
4767
* #### `compileCommands` (optional)
4868
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, the includes and defines discovered in this file will be used instead of the values set for `includePath` and `defines`. If the compile commands database does not contain an entry for the translation unit that corresponds to the file you opened in the editor, then a warning message will appear and the extension will use the `includePath` and `defines` settings instead.
4969

50-
*For more information about the file format, see the [Clang documentation](https://clang.llvm.org/docs/JSONCompilationDatabase.html). Some build systems, such as CMake, [simplify generating this file](https://cmake.org/cmake/help/v3.5/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html).*
70+
*For more information about the file format, see the [Clang documentation](https://clang.llvm.org/docs/JSONCompilationDatabase.html). Some build systems, such as CMake, [simplify generating this file](https://cmake.org/cmake/help/v3.5/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html).*
5171

5272
* #### `browse`
5373
The set of properties used when `"C_Cpp.intelliSenseEngine"` is set to `"Tag Parser"` (also referred to as "fuzzy" IntelliSense, or the "browse" engine). These properties are also used by the Go To Definition/Declaration features, or when the "Default" IntelliSense engine is unable to resolve the #includes in your source files.

Extension/.vscode/launch.json

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,30 @@
77
"type": "extensionHost",
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
10-
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
10+
"args": [
11+
"--extensionDevelopmentPath=${workspaceFolder}"
12+
],
1113
"stopOnEntry": false,
1214
"sourceMaps": true,
13-
"outFiles": ["${workspaceRoot}/out/src"],
15+
"outFiles": [
16+
"${workspaceFolder}/out/**/*.js"
17+
],
1418
"preLaunchTask": "npm"
1519
},
1620
{
1721
"name": "Launch Tests",
1822
"type": "extensionHost",
1923
"request": "launch",
2024
"runtimeExecutable": "${execPath}",
21-
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
25+
"args": [
26+
"--extensionDevelopmentPath=${workspaceFolder}",
27+
"--extensionTestsPath=${workspaceFolder}/out/test"
28+
],
2229
"stopOnEntry": false,
2330
"sourceMaps": true,
24-
"outFiles": ["${workspaceRoot}/out/test"],
31+
"outFiles": [
32+
"${workspaceFolder}/out/test/**/*.js"
33+
],
2534
"preLaunchTask": "npm"
2635
},
2736
{
@@ -31,20 +40,20 @@
3140
"port": 5858
3241
},
3342
{
34-
"name": "Launch Integration Tests",
35-
"type": "extensionHost",
36-
"request": "launch",
37-
"runtimeExecutable": "${execPath}",
38-
"args": [
39-
"${workspaceRoot}/test/integrationTests/testAssets/SimpleCppProject",
40-
"--extensionDevelopmentPath=${workspaceRoot}",
41-
"--extensionTestsPath=${workspaceRoot}/out/test/integrationTests"
42-
],
43-
"stopOnEntry": false,
44-
"sourceMaps": true,
45-
"outFiles": [
46-
"${workspaceRoot}/out/test/**/*.js"
47-
]
48-
},
43+
"name": "Launch Integration Tests",
44+
"type": "extensionHost",
45+
"request": "launch",
46+
"runtimeExecutable": "${execPath}",
47+
"args": [
48+
"${workspaceFolder}/test/integrationTests/testAssets/SimpleCppProject",
49+
"--extensionDevelopmentPath=${workspaceFolder}",
50+
"--extensionTestsPath=${workspaceFolder}/out/test/integrationTests"
51+
],
52+
"stopOnEntry": false,
53+
"sourceMaps": true,
54+
"outFiles": [
55+
"${workspaceFolder}/out/test/**/*.js"
56+
]
57+
},
4958
]
50-
}
59+
}

Extension/CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
# C/C++ for Visual Studio Code Change Log
22

3+
## Version 0.16.0: March 22, 2018
4+
* Enable autocomplete for local and global scopes. [#13](https://github.com/Microsoft/vscode-cpptools/issues/13)
5+
* Add a setting to define multiline comment patterns: `C_Cpp.commentContinuationPatterns`. [#1100](https://github.com/Microsoft/vscode-cpptools/issues/1100), [#1539](https://github.com/Microsoft/vscode-cpptools/issues/1539)
6+
* Add a setting to disable inactive region highlighting: `C_Cpp.dimInactiveRegions`. [#1592](https://github.com/Microsoft/vscode-cpptools/issues/1592)
7+
* Add `forcedInclude` configuration setting. [#852](https://github.com/Microsoft/vscode-cpptools/issues/852)
8+
* Add `compilerPath`, `cStandard`, and `cppStandard` configuration settings, and query gcc/clang-based compilers for default defines. [#1293](https://github.com/Microsoft/vscode-cpptools/issues/1293), [#1251](https://github.com/Microsoft/vscode-cpptools/issues/1251), [#1448](https://github.com/Microsoft/vscode-cpptools/issues/1448), [#1465](https://github.com/Microsoft/vscode-cpptools/issues/1465), [#1484](https://github.com/Microsoft/vscode-cpptools/issues/1484)
9+
* Fix text being temporarily gray when an inactive region is deleted. [Microsoft/vscode#44872](https://github.com/Microsoft/vscode/issues/44872)
10+
* Add support for `${workspaceFolder}` variable in **c_cpp_properties.json**. [#1392](https://github.com/Microsoft/vscode-cpptools/issues/1392)
11+
* Fix IntelliSense not updating in source files after dependent header files are changed. [#1501](https://github.com/Microsoft/vscode-cpptools/issues/1501)
12+
* Change database icon to use the `statusBar.foreground` color. [#1638](https://github.com/Microsoft/vscode-cpptools/issues/1638)
13+
* Enable C++/CLI IntelliSense mode via adding the `/clr` arg to the `compilerPath`. [#1596](https://github.com/Microsoft/vscode-cpptools/issues/1596)
14+
* Fix delay in language service activation caused by **cpptools.json** downloading. [#1640](https://github.com/Microsoft/vscode-cpptools/issues/1640)
15+
* Fix debugger failure when a single quote is in the path. [#1554](https://github.com/Microsoft/vscode-cpptools/issues/1554)
16+
* Fix terminal stdout and stderr redirection to not send to VS Code. [#1348](https://github.com/Microsoft/vscode-cpptools/issues/1348)
17+
* Fix blank config and endless "Initializing..." if the file watcher limit is hit when using `compileCommands`. [PR #1709](https://github.com/Microsoft/vscode-cpptools/pull/1709)
18+
* Fix error squiggles re-appearing after editing then closing a file. [#1712](https://github.com/Microsoft/vscode-cpptools/issues/1712)
19+
* Show error output from clang-format. [#1259](https://github.com/Microsoft/vscode-cpptools/issues/1259)
20+
* Fix `add_expression_to_index` crash (most frequent crash in 0.15.0). [#1396](https://github.com/Microsoft/vscode-cpptools/issues/1396)
21+
* Fix incorrect error squiggle `explicitly instantiated more than once`. [#871](https://github.com/Microsoft/vscode-cpptools/issues/871)
22+
323
## Version 0.15.0: February 15, 2018
424
* Add colorization for inactive regions. [#1466](https://github.com/Microsoft/vscode-cpptools/issues/1466)
525
* Fix 3 highest hitting crashes. [#1137](https://github.com/Microsoft/vscode-cpptools/issues/1137), [#1337](https://github.com/Microsoft/vscode-cpptools/issues/1337), [#1497](https://github.com/Microsoft/vscode-cpptools/issues/1497)
6-
* Update IntelliSense compiler (bug fixes and more C++17 support). [#1067](https://github.com/Microsoft/vscode-cpptools/issues/1067), [#1313](https://github.com/Microsoft/vscode-cpptools/issues/1313), [#1461](https://github.com/Microsoft/vscode-cpptools/issues/1461)
26+
* Update IntelliSense compiler (bug fixes and more C++17 support). [#1067](https://github.com/Microsoft/vscode-cpptools/issues/1067), [#1313](https://github.com/Microsoft/vscode-cpptools/issues/1313)
727
* Fix duplicate `cannot open source file` errors. [#1469](https://github.com/Microsoft/vscode-cpptools/issues/1469)
828
* Fix `Go to Symbol in File...` being slow for large workspaces. [#1472](https://github.com/Microsoft/vscode-cpptools/issues/1472)
929
* Fix stuck processes during shutdown. [#1474](https://github.com/Microsoft/vscode-cpptools/issues/1474)

Extension/ReleaseNotes.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ <h1>Microsoft C/C++ Extension for VS Code</h1>
205205
<tr>
206206
<td>
207207
<div>
208-
<h2 class="caption">February 2018 Update</h2>
209-
<div>Thank you for installing the C/C++ extension. In the February update, we added colorization around inactive preprocessor blocks. We also accepted our first pull requests from the community. Thanks for helping to make our extension better!<br />
208+
<h2 class="caption">March 2018 Update</h2>
209+
<div>Thank you for installing the C/C++ extension. In the March update, we finished our implementation of autocomplete for the default IntelliSense engine. We also added additional configuration settings for forced include files, specifying your compiler path and language standard to improve IntelliSense accuracy.<br />
210210
<br />
211211
Additional features and bug fixes are detailed in the <a href="https://github.com/Microsoft/vscode-cpptools/releases">full release notes</a>.</div>
212212
</div>
@@ -220,7 +220,7 @@ <h2 class="caption">February 2018 Update</h2>
220220
<td>
221221
<div>
222222
<h3 class="caption">Getting Started</h3>
223-
<div><a href="https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting%20started.md">Configuring IntelliSense</a></div>
223+
<div><a href="https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting%20started%20with%20IntelliSense%20configuration.md">Configuring IntelliSense</a></div>
224224
<div><a href="https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md">Configuring Debugging</a></div>
225225
<div><a href="https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/MinGW.md">IntelliSense for MinGW projects</a></div>
226226
<div><a href="https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/Windows%20Subsystem%20for%20Linux.md">IntelliSense for Windows Subsystem for Linux projects</a></div>
@@ -231,9 +231,9 @@ <h3 class="caption">Getting Started</h3>
231231
<td>
232232
<div>
233233
<h3 class="caption">Blog Posts</h3>
234+
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/02/20/visual-studio-code-cc-extension-feb-2018-update/">February 2018 Update</a></div>
234235
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/01/17/visual-studio-code-cc-extension-jan-2018-update/">January 2018 Update</a></div>
235236
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2017/12/11/visual-studio-code-cc-extension-dec-2017-update-support-for-more-linux-distros/">December 2017 Update</a></div>
236-
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2017/11/09/visual-studio-code-cc-extension-nov-2017-update-multi-root-workspaces-support-is-here/">November 2017 Update</a></div>
237237
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/">C/C++ Extension anouncement</a></div>
238238
</div>
239239
</td>

Extension/bin/msvc.64.darwin.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"defaults": [
33
"--clang",
44
"--pack_alignment",
5-
"8",
6-
"-D__CHAR_BIT__=8"
5+
"8"
76
],
87
"defaults_op" : "merge"
98
}

Extension/bin/msvc.64.intel.clang.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"defaults": [
33
"--clang",
44
"--pack_alignment",
5-
"8",
6-
"-D__CHAR_BIT__=8"
5+
"8"
76
],
87
"defaults_op" : "merge"
98
}

Extension/bin/msvc.64.linux.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"defaults": [
33
"--clang",
44
"--pack_alignment",
5-
"8",
6-
"-D__CHAR_BIT__=8"
5+
"8"
76
],
87
"defaults_op" : "merge"
98
}

Extension/bin/msvc.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
{
2929
"match": "^/dE--header_only_fallback",
3030
"replace": "--header_only_fallback"
31-
},
32-
{
33-
"match": "^/lang_c_",
34-
"replace": "--c\n--c11"
35-
},
36-
{
37-
"match": "^/lang_cpp_",
38-
"replace": "--c++17"
3931
}
4032
]
4133
}

Extension/c_cpp_properties.schema.json

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,36 @@
1111
],
1212
"properties": {
1313
"name": {
14-
"description": "Platform name. Mac, Linux, or Win32 are the defaults unless a custom platform is added.",
14+
"description": "Configuration identifier. Mac, Linux, or Win32 are special identifiers for configurations that will be auto-selected on those platforms, but the identifier can be anything.",
1515
"type": "string"
1616
},
17-
"compileCommands":{
18-
"description": "path to compile_commands.json file for the workspace",
19-
"type":"string"
17+
"compilerPath": {
18+
"description": "Full path of the compiler being used, e.g. /usr/bin/gcc, to enable more accurate IntelliSense. Args can be added to modify the includes/defines used, e.g. -nostdinc++, -m32, etc., but paths with spaces must be surrounded with \\\" if args are used.",
19+
"type": "string"
20+
},
21+
"cStandard": {
22+
"description": "Version of the C language standard to use for IntelliSense.",
23+
"type": "string",
24+
"enum": [
25+
"c89",
26+
"c99",
27+
"c11"
28+
]
29+
},
30+
"cppStandard": {
31+
"description": "Version of the C++ language standard to use for IntelliSense.",
32+
"type": "string",
33+
"enum": [
34+
"c++98",
35+
"c++03",
36+
"c++11",
37+
"c++14",
38+
"c++17"
39+
]
40+
},
41+
"compileCommands": {
42+
"description": "Full path to compile_commands.json file for the workspace.",
43+
"type": "string"
2044
},
2145
"includePath": {
2246
"description": "A list of paths for the IntelliSense engine to use while searching for included headers. Searching on these paths is not recursive.",
@@ -47,11 +71,18 @@
4771
],
4872
"description": "If set, it overrides the default mode used by the IntelliSense engine. Windows defaults to msvc-x64 and Linux/Mac default to clang-x64."
4973
},
74+
"forcedInclude": {
75+
"description": "A list of files that should be included before any include file in a translation unit.",
76+
"type": "array",
77+
"items": {
78+
"type": "string"
79+
}
80+
},
5081
"browse": {
5182
"type": "object",
5283
"properties": {
5384
"limitSymbolsToIncludedHeaders": {
54-
"description": "true to process only those files directly or indirectly included as headers, false to process all files under the specified include paths",
85+
"description": "true to process only those files directly or indirectly included as headers, false to process all files under the specified include paths.",
5586
"type": "boolean"
5687
},
5788
"databaseFilename": {

0 commit comments

Comments
 (0)