Skip to content

Commit b757b0b

Browse files
Taojunshen3836425+corob-msft@users.noreply.i.8713187.xyzopbld16TylerMSFTTylerMSFT
authored
2/23/2022 AM Publish (#4126)
* Change __STDC__ documentation for 17.2 * Twhitney updateui (#4082) * update ui steps * simplify * fix formatting * try a note * formatting * bridge the note * edits * edits * acrolinx * Update docs/build/walkthrough-header-units.md Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]> * Fix link to CreateProcess function * Update exception-handling-x64.md * US1907300 - add md code escapes to code elements - PR9 * Address cpp-docs 3691, 3688, 3684, 3664 (#4085) * [17.2p1] Add /scanDependencies option to docs (#4059) * Add /scanDependencies option to docs * Acrolinx pass * Updates per review by Cameron * Consistency of command option formatting * Add IDE instructions * Tweaks per comments. * US1907300 - add md code escapes to code elements - PR7 (#4076) * US1907300 - add md code escapes to code elements - PR7 * US1907300 - add md code escapes to code elements - PR7 * updates after review * updates after review * updates after review * updates after review * updates after review * US1907300 - add md code escapes to code elements - PR8 (#4080) * US1907300 - add md code escapes to code elements - PR8 * updates after review * updates after review * updates after review * fix blocking issue * Address DD 1462641 (#4086) * Content for 17.1 release * US1907300 - add md code escapes to code elements - PR9 * fix formatting issue * US1907300 - add md code escapes to code elements - PR10 * updates after review * updates after review * updates after review * updates after review * updates after review * Address cpp-docs 3694, 3696 * Update what-s-new-for-visual-cpp-in-visual-studio.md fix typo * add links (#4094) Co-authored-by: TylerMSFT <[email protected]> * Address cpp-docs 3694, 3696 (#4091) * Updates for cpp-docs 3700 3703 * Add op= to example * Add 3448,3482,3483,3540,3683 updates * Use existing media for CMake Targets View * US1907300 - add md code escapes to code elements - PR11 (#4095) * US1907300 - add md code escapes to code elements - PR11 * updates after review * fix table syntax * trying to fix table rendering error * trying to fix table rendering error * trying to fix table rendering error * update after review * Additional clean-up for DD 1462641 * Set ms.topic: faq where YamlMime:FAQ (#4099) * Release notes and conformance for 17.1 * typo fix * Use ConcRT instead of ConCRT ConcRT is a more correct abbreviation for Concurrency Runtime Library. ConcRT also appears in the comment in the beginning of concrt.h. * cpp-docs 3590 in progress * US1907300 - add md code escapes to code elements - PR12 (#4103) * US1907300 - add md code escapes to code elements - PR12 * changes afteer review * changes afteer review * changes afteer review * changes afteer review * Bulk fix: \&#124; entity removal 1/n * Bulk fix: pipe entity removal 2 of n * clarify operators * Bulk fix: Pipe entity 3 of n * Fix grammar * Bulk fix pipe entities 4 of n * Bulk fix * Undo change * Fix pipe entities 5 of n * Fix more pipe entity issues * US1907300 - add md code escapes to code elements - PR13 (#4110) * US1907300 - add md code escapes to code elements - PR13 * changes afteer review * changes after review * Add missing Properties and F1 targets * Tweak dates, Acrolinx * Fix links * US1907300 - add md code escapes to code elements - PR14 * changes after review * Add C7553, C5240, diagnostics fixes * Add C5054, C5055, C5056 warnings * fix link * Fix a collection of cpp-docs issues * Add C7553, C5240 to TOC * Add C5054, C5055, C5056 to TOC * Tweaks to cpp-docs-220222 Co-authored-by: [email protected] <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]> Co-authored-by: ishchukin <[email protected]> Co-authored-by: p4yl0ad <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Craig Casey <[email protected]> Co-authored-by: PRMerger9 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: Dennis Rea <[email protected]> Co-authored-by: jason <[email protected]> Co-authored-by: Linda Spiller <[email protected]> Co-authored-by: Alex Buck <[email protected]> Co-authored-by: myd7349 <[email protected]> Co-authored-by: Kristine Toliver <[email protected]> Co-authored-by: PRMerger15 <[email protected]> Co-authored-by: PRMerger16 <[email protected]> Co-authored-by: PRMerger Service account 2 <[email protected]> Co-authored-by: PRMerger12 <[email protected]> Co-authored-by: Tamara K <[email protected]> Co-authored-by: PRMerger4 <[email protected]>
1 parent 6dce5d6 commit b757b0b

22 files changed

+445
-161
lines changed
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,43 @@
11
---
2-
description: "Learn more about: /Qpar (Auto-Parallelizer)"
3-
title: "/Qpar (Auto-Parallelizer)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /Qpar (Auto-parallelizer)"
3+
title: "/Qpar (Auto-parallelizer)"
4+
ms.date: 02/22/2022
55
f1_keywords: ["VC.Project.VCCLCompilerTool.EnableParallelCodeGeneration"]
66
ms.assetid: 33ecf49d-c0d5-4f34-bce3-84ff03f38918
77
---
8-
# /Qpar (Auto-Parallelizer)
8+
# `/Qpar` (Auto-parallelizer)
99

10-
Enables the [Auto-Parallelizer](../../parallel/auto-parallelization-and-auto-vectorization.md) feature of the compiler to automatically parallelize loops in your code.
10+
Enables the [Auto-parallelizer](../../parallel/auto-parallelization-and-auto-vectorization.md) feature of the compiler to automatically parallelize loops in your code.
1111

1212
## Syntax
1313

14-
```
15-
/Qpar
16-
```
14+
> **`/Qpar`**
1715
1816
## Remarks
1917

20-
When the compiler automatically parallelizes loops in code, it spreads computation across multiple processor cores. A loop is parallelized only if the compiler determines that it is legal to do so and that parallelization would improve performance.
18+
When the compiler automatically parallelizes loops in code, it spreads computation across multiple processor cores. The compiler parallelizes a loop only if it determines that it's legal to do so and that parallelization would improve performance.
2119

22-
The `#pragma loop()` directives are available to help the optimizer parallelize specific loops. For more information, see [loop](../../preprocessor/loop.md).
20+
The `#pragma loop()` directives are available to help the optimizer parallelize specific loops. For more information, see [`loop`](../../preprocessor/loop.md).
2321

24-
For information about how to enable output messages for the auto-parallelizer, see [/Qpar-report (Auto-Parallelizer Reporting Level)](qpar-report-auto-parallelizer-reporting-level.md).
22+
For information about how to enable output messages for the auto-parallelizer, see [`/Qpar-report` (Auto-parallelizer reporting level)](qpar-report-auto-parallelizer-reporting-level.md).
2523

26-
### To set the /Qpar compiler option in Visual Studio
24+
### To set the `/Qpar` compiler option in Visual Studio
2725

2826
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
2927

30-
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
28+
1. Select the **Configuration Properties** > **C/C++** > **Code Generation** property page.
3129

32-
1. In the **Additional Options** box, enter *`/Qpar`*.
30+
1. Modify the **Enable Parallel Code Generation** property. Choose **OK** or **Apply** to save your changes.
3331

34-
### To set the /Qpar compiler option programmatically
32+
### To set the `/Qpar` compiler option programmatically
3533

3634
- Use the code example in <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
3735

3836
## See also
3937

40-
[/Q Options (Low-Level Operations)](q-options-low-level-operations.md)<br/>
41-
[/Qpar-report (Auto-Parallelizer Reporting Level)](qpar-report-auto-parallelizer-reporting-level.md)<br/>
42-
[MSVC Compiler Options](compiler-options.md)<br/>
43-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)<br/>
44-
[#pragma loop()](../../preprocessor/loop.md)<br/>
38+
[`/Q` options (Low-level operations)](q-options-low-level-operations.md)\
39+
[`/Qpar-report` (Auto-parallelizer reporting level)](qpar-report-auto-parallelizer-reporting-level.md)\
40+
[MSVC compiler options](compiler-options.md)\
41+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
42+
[`#pragma loop()`](../../preprocessor/loop.md)\
4543
[Native code vectorization in Visual Studio](/archive/blogs/nativeconcurrency/auto-vectorizer-in-visual-studio-2012-overview)
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
---
2-
description: "Learn more about: /STACK (Stack Allocations)"
3-
title: "/STACK (Stack Allocations)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /STACK (Stack allocations)"
3+
title: "/STACK (Stack allocations)"
4+
ms.date: 02/22/2022
55
f1_keywords: ["VC.Project.VCLinkerTool.StackReserveSize", "VC.Project.VCLinkerTool.StackCommitSize", "/stack"]
66
helpviewer_keywords: ["STACK linker option", "-STACK linker option", "memory allocation, stack", "/STACK linker option", "stack, setting size"]
77
ms.assetid: 73283660-e4bd-47cc-b5ca-04c5d739034c
88
---
9-
# /STACK (Stack Allocations)
9+
# `/STACK` (Stack allocations)
1010

11-
```
12-
/STACK:reserve[,commit]
13-
```
11+
> **`/STACK:`***`reserve`*[**`,`***`commit`*]
1412
1513
## Remarks
1614

17-
The /STACK option sets the size of the stack in bytes. Use this option only when you build an .exe file.
15+
The **`/STACK`** linker option sets the size of the stack in bytes. Use this option only when you build an *`.exe`* file. The **`/STACK`** option is ignored when applied to *`.dll`* files.
1816

19-
The `reserve` value specifies the total stack allocation in virtual memory. For ARM, x86 and x64 machines, the default stack size is 1 MB.
17+
The *`reserve`* value specifies the total stack allocation in virtual memory. For ARM64, x86, and x64 machines, the default stack size is 1 MB.
2018

21-
`commit` is subject to interpretation by the operating system. In Windows WindowsRT it specifies the amount of physical memory to allocate at a time. Committed virtual memory causes space to be reserved in the paging file. A higher `commit` value saves time when the application needs more stack space, but increases the memory requirements and possibly the startup time. For ARM, x86 and x64 machines, the default commit value is 4 KB.
19+
The *`commit`* value is subject to interpretation by the operating system. In WindowsRT, it specifies the amount of physical memory to allocate at a time. Committed virtual memory causes space to be reserved in the paging file. A higher *`commit`* value saves time when the application needs more stack space, but increases the memory requirements and possibly the startup time. For ARM64, x86, and x64 machines, the default *`commit`* value is 4 KB.
2220

23-
Specify the `reserve` and `commit` values in decimal or C-language notation.
21+
Specify the *`reserve`* and *`commit`* values in decimal or C-language hexadecimal notation (use a `0x` prefix).
2422

25-
Another way to set the size of the stack is with the [STACKSIZE](stacksize.md) statement in a module-definition (.def) file. **STACKSIZE** overrides the Stack Allocations (/STACK) option if both are specified. You can change the stack size after the .exe file is built by using the [EDITBIN](editbin-reference.md) tool.
23+
Another way to set the size of the stack is with the [`STACKSIZE`](stacksize.md) statement in a module-definition (*`.def`*) file. **`STACKSIZE`** overrides the Stack Allocations (**`/STACK`**) option if both are specified. You can change the stack size after the *`.exe`* file is built by using the [`EDITBIN`](editbin-reference.md) tool.
2624

2725
### To set this linker option in the Visual Studio development environment
2826

@@ -42,5 +40,5 @@ Another way to set the size of the stack is with the [STACKSIZE](stacksize.md) s
4240

4341
## See also
4442

45-
[MSVC linker reference](linking.md)<br/>
46-
[MSVC Linker Options](linker-options.md)
43+
[MSVC linker reference](linking.md)\
44+
[MSVC linker options](linker-options.md)
Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,59 @@
11
---
2-
description: "Learn more about: /Zm (Specify Precompiled Header Memory Allocation Limit)"
3-
title: "/Zm (Specify Precompiled Header Memory Allocation Limit)"
4-
ms.date: "03/08/2019"
5-
f1_keywords: ["/zm"]
2+
description: "Learn more about: /Zm (Specify precompiled header memory allocation limit)"
3+
title: "/Zm (Specify precompiled header memory allocation limit)"
4+
ms.date: 02/22/2022
5+
f1_keywords: ["/Zm"]
66
helpviewer_keywords: ["PCH files, memory allocation limit", "Zm compiler option [C++]", "/Zm compiler option [C++]", "precompiled header files, memory allocation limit", "Specify Precompiled Header Memory Allocation Limit compiler option", "cl.exe compiler, memory allocation limit", ".pch files, memory allocation limit", "memory allocation, Memory Allocation Limit compiler option", "-Zm compiler option [C++]"]
77
ms.assetid: 94c77d5e-6672-46a7-92e0-3f69e277727d
88
---
9-
# /Zm (Specify Precompiled Header Memory Allocation Limit)
9+
# `/Zm` (Specify precompiled header memory allocation limit)
1010

1111
Determines the amount of memory that the compiler allocates to construct precompiled headers.
1212

1313
## Syntax
1414

15-
```
16-
/Zmfactor
17-
```
15+
> **`/Zm`***`factor`*
1816
1917
## Arguments
2018

21-
*factor*<br/>
22-
A scaling factor that determines the amount of memory that the compiler uses to construct precompiled headers.
19+
*`factor`*<br/>
20+
A scaling factor percentage that determines the amount of memory that the compiler uses to construct precompiled headers.
2321

24-
The *factor* argument is a percentage of the default size of a compiler-defined work buffer. The default value of *factor* is 100 (percent), but you can specify larger or smaller amounts.
22+
The *`factor`* argument is a percentage of the default size of a compiler-defined work buffer. The default value of *`factor`* is 100 (percent), but you can specify larger or smaller amounts.
2523

2624
## Remarks
2725

28-
In versions before Visual Studio 2015, the C++ compiler used several discrete heaps, and each had a finite limit. Currently, the compiler dynamically grows the heaps as necessary up to a total heap size limit, and allows the precompiled header to comprise multiple address ranges. Consequently, the **/Zm** compiler option is rarely necessary.
26+
In versions before Visual Studio 2015, the C++ compiler used several discrete heaps, and each had a finite limit. Currently, the compiler dynamically grows the heaps as necessary up to a total heap size limit, and allows the precompiled header to comprise multiple address ranges. Now, the **`/Zm`** compiler option is rarely necessary.
2927

30-
If the compiler runs out of heap space and emits the [C1060](../../error-messages/compiler-errors-1/fatal-error-c1060.md) error message when you use the **/Zm** compiler option, you might have reserved too much memory. Consider removing the **/Zm** option.
28+
If the compiler runs out of heap space and emits the [C1060](../../error-messages/compiler-errors-1/fatal-error-c1060.md) error message when you use the **`/Zm`** compiler option, you might have reserved too much memory. Consider removing the **`/Zm`** option.
3129

32-
If the compiler emits the [C1076](../../error-messages/compiler-errors-1/fatal-error-c1076.md) error message, an accompanying [C3859](../../error-messages/compiler-errors-2/compiler-error-c3859.md) message specifies the *factor* argument to use when you recompile by using the **/Zm** compiler option. This message is only significant when a precompiled header uses `#pragma hdrstop`. In other cases, it is a spurious error caused by Windows virtual memory pressure issues, and the recommendation to use the **/Zm** option should be ignored. Instead, consider reducing the number of parallel processes when using the **/maxcpucount** option to MSBUILD.EXE in conjunction with the **/MP** option to CL.EXE. For more information, see [Precompiled Header (PCH) issues and recommendations](https://devblogs.microsoft.com/cppblog/precompiled-header-pch-issues-and-recommendations/).
30+
If the compiler emits the [C1076](../../error-messages/compiler-errors-1/fatal-error-c1076.md) error message, an accompanying [C3859](../../error-messages/compiler-errors-2/compiler-error-c3859.md) message specifies the *`factor`* argument to use when you recompile by using the **`/Zm`** compiler option. This message is only significant when a precompiled header uses `#pragma hdrstop`. In other cases, it's a spurious error caused by Windows virtual memory pressure issues, and the recommendation to use the **`/Zm`** option should be ignored. Instead, consider reducing the number of parallel processes when using the **`/maxcpucount`** option to MSBUILD.EXE together with the **`/MP`** option to CL.EXE. For more information, see [Precompiled Header (PCH) issues and recommendations](https://devblogs.microsoft.com/cppblog/precompiled-header-pch-issues-and-recommendations/).
3331

34-
The following table shows how the *factor* argument affects the memory allocation limit if you assume the size of the default precompiled header buffer is 75 MB.
32+
The following table shows how the *`factor`* argument affects the memory allocation limit. In the table, we assume the size of the default precompiled header buffer is 75 MB.
3533

36-
|Value of *factor*|Memory allocation limit|
37-
|-----------------------|-----------------------------|
38-
|10|7.5 MB|
39-
|100|75 MB|
40-
|200|150 MB|
41-
|1000|750 MB|
42-
|2000|1500 MB|
34+
| Value of *`factor`* | Memory allocation limit |
35+
|--|--|
36+
| 10 | 7.5 MB |
37+
| 100 | 75 MB |
38+
| 200 | 150 MB |
39+
| 1000 | 750 MB |
40+
| 2000 | 1500 MB |
4341

44-
## Other Ways to Set the Memory Allocation Limit
42+
## Other ways to set the memory allocation limit
4543

46-
### To set the /Zm compiler option in the Visual Studio development environment
44+
### To set the `/Zm` compiler option in the Visual Studio development environment
4745

4846
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
4947

5048
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
5149

5250
1. Enter the **/Zm** compiler option in the **Additional Options** box.
5351

54-
### To set the /Zm compiler option programmatically
52+
### To set the `/Zm` compiler option programmatically
5553

5654
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
5755

5856
## See also
5957

60-
[MSVC Compiler Options](compiler-options.md)<br/>
61-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
58+
[MSVC compiler options](compiler-options.md)<br/>
59+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

docs/code-quality/clang-tidy.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Using Clang-Tidy in Visual Studio
33
description: "How to use Clang-Tidy in Visual Studio for Microsoft C++ code analysis."
4-
ms.date: 02/19/2020
4+
ms.date: 02/22/2022
55
ms.topic: "conceptual"
66
f1_keywords: ["vs.codeanalysis.clangtidy"]
77
---
88
# Using Clang-Tidy in Visual Studio
99

1010
::: moniker range="<=msvc-150"
1111

12-
Support for Clang-Tidy requires Visual Studio 2019 version 16.4 or later. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
12+
Support for Clang-Tidy requires Visual Studio 2019 version 16.4 or later. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019 or later. It's found at the top of the table of contents on this page.
1313

1414
::: moniker-end
1515

@@ -45,11 +45,11 @@ Clang-Tidy runs result in warnings displayed in the Error List, and as in-editor
4545

4646
## Clang-Tidy configuration
4747

48-
You can configure the checks that clang-tidy runs inside Visual Studio via the **Clang-Tidy Checks** option. This input is provided to the **`--checks`** argument of the tool. Any further configuration can be included in custom *`.clang-tidy`* files. For more information, see the [Clang-Tidy documentation on LLVM.org](https://clang.llvm.org/extra/clang-tidy/).
48+
By default, Clang-Tidy does not set any checks when enabled. To see the list of checks in the command-line version, run `clang-tidy -list-checks` in a developer command prompt. You can configure the checks that Clang-Tidy runs inside Visual Studio. In the project Property Pages dialog, open the **Configuration Properties** > **Code Analysis** > **Clang-Tidy** page. Enter checks to run in the **Clang-Tidy Checks** property. A good default set is `clang-analyzer-*`. This property value is provided to the **`--checks`** argument of the tool. Any further configuration can be included in custom *`.clang-tidy`* files. For more information, see the [Clang-Tidy documentation on LLVM.org](https://clang.llvm.org/extra/clang-tidy/).
4949

5050
## See also
5151

52-
- [Clang/LLVM Support for MSBuild Projects](https://devblogs.microsoft.com/cppblog/clang-llvm-support-for-msbuild-projects/)
53-
- [Clang/LLVM Support for CMake Projects](https://devblogs.microsoft.com/cppblog/visual-studio-cmake-support-clang-llvm-cmake-3-14-vcpkg-and-performance-improvements/)
52+
- [Clang/LLVM support for MSBuild projects](https://devblogs.microsoft.com/cppblog/clang-llvm-support-for-msbuild-projects/)
53+
- [Clang/LLVM support for CMake projects](https://devblogs.microsoft.com/cppblog/visual-studio-cmake-support-clang-llvm-cmake-3-14-vcpkg-and-performance-improvements/)
5454

5555
::: moniker-end

0 commit comments

Comments
 (0)