You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/configure-cmake-debugging-sessions.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Configure CMake debugging sessions in Visual Studio"
3
3
description: "Describes how to use Visual Studio to configure CMake debugger settings."
4
-
ms.date: "12/07/2020"
4
+
ms.date: 12/16/2020
5
5
helpviewer_keywords: ["CMake debugging"]
6
6
---
7
7
# Configure CMake debugging sessions
@@ -14,7 +14,7 @@ Native CMake support is available in Visual Studio 2017 and later. To see the do
14
14
15
15
::: moniker range=">=msvc-150"
16
16
17
-
All executable CMake targets are shown in the **Startup Item** dropdown in the **General**toolbar. Select one to start a debugging session and launch the debugger.
17
+
All executable CMake targets are shown in the **Startup Item** dropdown in the toolbar. Select one to start a debugging session and launch the debugger.
@@ -105,8 +105,10 @@ In Visual Studio 2019 version 16.6, we added a new debug configuration of `type:
105
105
#### Additional options allowed with the `gdbserver` configuration (16.7 or later)
106
106
107
107
-`program`: Defaults to `"${debugInfo.fullTargetPath}"`. The Unix path to the application to debug. Only required if different than the target executable in the build or deploy location.
108
-
> [!TIP]
109
-
> Deploy is not yet supported for local cross-compilation scenarios. If you are cross-compiling on Windows (for example, using a cross-compiler on Windows to build a Linux ARM executable) then you'll need to manually copy the binary to the location specified by `program` on the remote ARM machine before debugging.
108
+
109
+
> [!TIP]
110
+
> Deploy is not yet supported for local cross-compilation scenarios. If you are cross-compiling on Windows (for example, using a cross-compiler on Windows to build a Linux ARM executable) then you'll need to manually copy the binary to the location specified by `program` on the remote ARM machine before debugging.
111
+
110
112
-`remoteMachineName`: Defaults to `"${debugInfo.remoteMachineName}"`. Name of the remote system that hosts the program to debug. Only required if different than the build system. Must have an existing entry in the [Connection Manager](../linux/connect-to-your-remote-linux-computer.md). Press **Ctrl+Space** to view a list of all existing remote connections.
111
113
-`cwd`: Defaults to `"${debugInfo.defaultWorkingDirectory}"`. Full Unix path to the directory on the remote system where `program` is run. The directory must exist.
112
114
-`gdbPath`: Defaults to `${debugInfo.vsInstalledGdb}`. Full Windows path to the `gdb` used to debug. Defaults to the `gdb` installed with the Linux development with C/C++ workload.
Copy file name to clipboardExpand all lines: docs/code-quality/how-to-specify-additional-code-information-by-using-analysis-assume.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,33 @@
1
1
---
2
-
description: "Learn more about: How to: Specify Additional Code Information by Using _Analysis_assume"
3
-
title: "Use _Analysis_assume for code analysis hints"
4
-
ms.date: 11/04/2016
2
+
description: "Learn more about how to specify additional code information by using _Analysis_assume_."
3
+
title: "Use _Analysis_assume_ for code analysis hints"
4
+
ms.date: 12/16/2020
5
5
ms.topic: "conceptual"
6
6
f1_keywords:
7
-
- "_Analysis_assume"
7
+
- "_Analysis_assume_"
8
8
helpviewer_keywords:
9
-
- "_Analysis_assume"
10
-
ms.assetid: 51205d97-4084-4cf4-a5ed-3eeaf67deb1b
9
+
- "_Analysis_assume_"
11
10
---
12
-
# How to: Specify Additional Code Information by Using _Analysis_assume
11
+
# How to specify additional code information by using `_Analysis_assume_`
13
12
14
-
You can provide hints to the code analysis tool for C/C++ code that will help the analysis process and reduce warnings. To provide additional information, use the following function:
13
+
You can provide hints to the code analysis tool for C/C++ code that will help the analysis process and reduce warnings. To provide additional information, use the following function macro:
15
14
16
-
`_Analysis_assume(``expr``)`
15
+
`_Analysis_assume(expr)`
17
16
18
-
`expr` - any expression that is assumed to evaluate to true.
17
+
*`expr`* - any expression that is assumed to evaluate to true.
19
18
20
-
The code analysis tool assumes that the condition represented by the expression is true at the point where the function appears and remains true until expression is altered, for example, by assignment to a variable.
19
+
The code analysis tool assumes that the condition represented by the expression *`expr`*is true at the point where the function appears. And, it remains true until *`expr`* is altered, for example, by assignment to a variable.
21
20
22
21
> [!NOTE]
23
-
> `_Analysis_assume` does not impact code optimization. Outside the code analysis tool, `_Analysis_assume` is defined as a no-op.
22
+
> `_Analysis_assume_` does not impact code optimization. Outside the code analysis tool, `_Analysis_assume_` is defined as a no-op.
24
23
25
24
## Example
26
25
27
-
The following code uses `_Analysis_assume` to correct the code analysis warning [C6388](../code-quality/c6388.md):
26
+
The following code uses `_Analysis_assume_` to correct the code analysis warning [C6388](../code-quality/c6388.md):
Copy file name to clipboardExpand all lines: docs/code-quality/using-the-cpp-core-guidelines-checkers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Using the C++ Core Guidelines checkers
3
3
description: "How to set up and use the Microsoft C++ Code Analysis rules for C++ Core Guidelines."
4
-
ms.date: 07/27/2020
4
+
ms.date: 12/16/2020
5
5
ms.topic: "conceptual"
6
6
dev_langs:
7
7
- CPP
@@ -297,13 +297,13 @@ Code Analysis requires a few environment variables and compiler command-line opt
297
297
-`set esp.annotationbuildlevel=ignore` This disables the logic that processes SAL annotations. Annotations don't affect code analysis in the C++ Core Guidelines Checker, yet their processing takes time (sometimes a long time). This setting is optional, but highly recommended.
298
298
-`set caexcludepath=%include%` We highly recommend that you disable warnings that fire on standard headers. You can add more paths here, for example the path to the common headers in your project.
299
299
300
-
-**Commandline options**
300
+
-**Command-line options**
301
301
-**`/analyze`** Enables code analysis (consider also using **`/analyze:only`** and **`/analyze:quiet`**).
302
302
-**`/analyze:plugin EspXEngine.dll`** This option loads the Code Analysis Extensions engine into the PREfast. This engine, in turn, loads the C++ Core Guidelines Checker.
303
303
304
304
## Use the Guideline Support Library
305
305
306
-
The Guideline Support Library (GSL) is designed to help you follow the Core Guidelines. The GSL includes definitions that let you replace error-prone constructs with safer alternatives. For example, you can replace a `T*, length` pair of parameters with the `span<T>` type. The GSL is available at [http://www.nuget.org/packages/Microsoft.Gsl](https://www.nuget.org/packages/Microsoft.Gsl). The library is open-source, so you can view the sources, make comments, or contribute. The project can be found at [https://github.com/Microsoft/GSL](https://github.com/Microsoft/GSL).
306
+
The Guideline Support Library (GSL) is designed to help you follow the Core Guidelines. The GSL includes definitions that let you replace error-prone constructs with safer alternatives. For example, you can replace a `T*, length` pair of parameters with the `span<T>` type. The GSL project is available on GitHub at [https://github.com/Microsoft/GSL](https://github.com/Microsoft/GSL). The library is open-source, so you can view the sources, make comments, or contribute. You can also use the [vcpkg](../build/vcpkg.md) package manager to download and install the library locally.
You can handle an exception either by jumping to the level of the exception handler or by continuing execution. Instead of using the exception handler code to handle the exception and falling through, you can use *filter* to clean up the problem and then, by returning -1, resume normal flow without clearing the stack.
9
+
You can handle an exception either by jumping to the level of the exception handler or by continuing execution. Instead of using the exception handler code to handle the exception and falling through, you can use a *filter*expression to clean up the problem. Then, by returning `EXCEPTION_CONTINUE_EXECUTION` (-1), you may resume normal flow without clearing the stack.
11
10
12
11
> [!NOTE]
13
-
> Some exceptions cannot be continued. If *filter* evaluates to -1 for such an exception, the system raises a new exception. When you call [RaiseException](/windows/win32/api/errhandlingapi/nf-errhandlingapi-raiseexception), you determine whether the exception will continue.
12
+
> Some exceptions cannot be continued. If *filter* evaluates to -1 for such an exception, the system raises a new exception. When you call [`RaiseException`](/windows/win32/api/errhandlingapi/nf-errhandlingapi-raiseexception), you determine whether the exception will continue.
14
13
15
14
For example, the following code uses a function call in the *filter* expression: this function handles the problem and then returns -1 to resume normal flow of control:
16
15
@@ -39,19 +38,19 @@ int Eval_Exception ( int n_except ) {
39
38
}
40
39
```
41
40
42
-
It is a good idea to use a function call in the *filter* expression whenever *filter* needs to do anything complex. Evaluating the expression causes execution of the function, in this case, `Eval_Exception`.
41
+
It's a good idea to use a function call in the *filter* expression whenever *filter* needs to do anything complex. Evaluating the expression causes execution of the function, in this case, `Eval_Exception`.
43
42
44
-
Note the use of [GetExceptionCode](/windows/win32/Debug/getexceptioncode) to determine the exception. You must call this function inside the filter itself. `Eval_Exception` cannot call `GetExceptionCode`, but it must have the exception code passed to it.
43
+
Note the use of [`GetExceptionCode`](/windows/win32/Debug/getexceptioncode) to determine the exception. This function must be called inside the filter expression of the **`__except`** statement. `Eval_Exception` can't call `GetExceptionCode`, but it must have the exception code passed to it.
45
44
46
-
This handler passes control to another handler unless the exception is an integer or floating-point overflow. If it is, the handler calls a function (`ResetVars` is only an example, not an API function) to reset some global variables. *Statement-block-2*, which in this example is empty, can never be executed because `Eval_Exception` never returns EXCEPTION_EXECUTE_HANDLER (1).
45
+
This handler passes control to another handler unless the exception is an integer or floating-point overflow. If it is, the handler calls a function (`ResetVars` is only an example, not an API function) to reset some global variables. The **`__except`** statement block, which in this example is empty, can never be executed because `Eval_Exception` never returns `EXCEPTION_EXECUTE_HANDLER` (1).
47
46
48
47
Using a function call is a good general-purpose technique for dealing with complex filter expressions. Two other C language features that are useful are:
49
48
50
49
- The conditional operator
51
50
52
51
- The comma operator
53
52
54
-
The conditional operator is frequently useful, because it can be used to check for a specific return code and then return one of two different values. For example, the filter in the following code recognizes the exception only if the exception is STATUS_INTEGER_OVERFLOW:
53
+
The conditional operator is frequently useful here. It can be used to check for a specific return code and then return one of two different values. For example, the filter in the following code recognizes the exception only if the exception is `STATUS_INTEGER_OVERFLOW`:
The conditional operator is more useful in situations where you might want the filter to evaluate to -1, EXCEPTION_CONTINUE_EXECUTION.
65
+
The conditional operator is more useful in situations where you might want the filter to evaluate to -1, `EXCEPTION_CONTINUE_EXECUTION`.
67
66
68
-
The comma operator enables you to perform multiple, independent operations inside a single expression. The effect is roughly that of executing multiple statements and then returning the value of the last expression. For example, the following code stores the exception code in a variable and then tests it:
67
+
The comma operator lets you execute multiple expressions in sequence. It then returns the value of the last expression. For example, the following code stores the exception code in a variable and then tests it:
description: "Learn more about: Compiler Warning (level 1) C4027"
2
+
description: "Learn more about compiler warning (level 1) C4027"
3
3
title: "Compiler Warning (level 1) C4027"
4
-
ms.date: "11/04/2016"
4
+
ms.date: 12/16/2020
5
5
f1_keywords: ["C4027"]
6
6
helpviewer_keywords: ["C4027"]
7
-
ms.assetid: f30d57b9-20c4-4284-8686-566d9f0ca7fc
8
7
---
9
8
# Compiler Warning (level 1) C4027
10
9
11
-
function declared without formal parameter list
10
+
> function declared without formal parameter list
12
11
13
-
The function declaration no formal parameters, but there are formal parameters in the function definition or actual parameters in a call. Subsequent calls to this function assume that the function takes actual parameters of the types found in the function definition or call.
12
+
The function declaration had no formal parameters, but there are formal parameters in the function definition or actual parameters in a call.
13
+
14
+
The compiler accepts, but warns, on an old C-style forward declaration of a function name without a parameter list. On later calls to this function, the compiler assumes that the function takes actual parameters of the types found in the function definition or call. We recommend you modify your function declaration
15
+
to match the signature of the function definition.
Copy file name to clipboardExpand all lines: docs/intrinsics/noop.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,14 @@
1
1
---
2
-
description: "Learn more about: __noop"
2
+
description: "Learn more about Microsoft C/C++ intrinsic: __noop"
3
3
title: "__noop"
4
-
ms.date: "09/02/2019"
4
+
ms.date: 12/16/2020
5
5
f1_keywords: ["__noop_cpp", "__noop"]
6
6
helpviewer_keywords: ["__noop keyword [C++]"]
7
7
ms.assetid: 81ac6e97-7bf8-496b-b3c4-fd02837573e5
8
8
---
9
-
# __noop
9
+
# `__noop`
10
10
11
-
**Microsoft Specific**
12
-
13
-
The **`__noop`** intrinsic specifies that a function should be ignored. The argument list is parsed, but no code is generated for the arguments. It's intended for use in global debug functions that take a variable number of arguments.
11
+
The **Microsoft-specific****`__noop`** intrinsic specifies that a function should be ignored. The argument list is parsed, but no code is generated for the arguments. The compiler considers the arguments as referenced for the purposes of compiler warning C4100 and similar analysis. The `__noop` intrinsic is intended for use in global debug functions that take a variable number of arguments.
14
12
15
13
The compiler converts the **`__noop`** intrinsic to 0 at compile time.
16
14
@@ -20,6 +18,7 @@ The following code shows how you could use **`__noop`**.
Copy file name to clipboardExpand all lines: docs/linux/connect-to-your-remote-linux-computer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ If ssh isn't already set up and running on your Linux system, follow these steps
118
118
119
119
## TCP Port Forwarding
120
120
121
-
Visual Studio's Linux support has a dependency on TCP port forwarding. **Rsync** and **gdbserver** are affected if TCP port forwarding is disabled on your remote system. If you're impacted by this dependency, you can upvote this [suggestion ticket](https://developercommunity.visualstudio.com/idea/840265/dont-rely-on-ssh-tcp-port-forwarding-for-c-remote.html) on Developer Community.
121
+
Visual Studio's Linux support has a dependency on TCP port forwarding. **Rsync** and **gdbserver** are affected if TCP port forwarding is disabled on your remote system. If you're impacted by this dependency, you can upvote this [suggestion ticket](https://developercommunity2.visualstudio.com/t/shDonshshtsh-shrelysh-s/840265?space=62) on Developer Community.
122
122
123
123
rsync is used by both MSBuild-based Linux projects and CMake projects to [copy headers from your remote system to Windows for use by IntelliSense](configure-a-linux-project.md#remote_intellisense). When you can't enable TCP port forwarding, disable the automatic download of remote headers. To disable it, use **Tools > Options > Cross Platform > Connection Manager > Remote Headers IntelliSense Manager**. If the remote system doesn't have TCP port forwarding enabled, you'll see this error when the download of remote headers for IntelliSense begins:
0 commit comments