Skip to content

Commit 249bee1

Browse files
committed
Address review comments.
1 parent b9f5c17 commit 249bee1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/code-quality/c26439.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ ms.assetid: 9df2a1b0-ea94-4884-9d28-c1522ec33a1b
1010

1111
> This kind of function may not throw. Declare it 'noexcept'.
1212
13-
[**C++ Core Guidelines** F.6](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-noexcept): If your function must not throw, declare it noexcept
13+
[**C++ Core Guidelines** F.6](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-noexcept): If your function must not throw, declare it `noexcept`
1414

15-
Some kinds of operations should never throw exceptions. Their implementations should be reliable and should handle possible errors conditions gracefully. They should never use exceptions to indicate failure. This rule flags cases where such operations aren't explicitly marked as `noexcept`, which means that they may throw exceptions and can't convey assumptions about their reliability.
15+
Some operations should never throw exceptions. Their implementations should be reliable and should handle possible errors conditions gracefully. They shouldn't use exceptions to indicate failure. This rule flags cases where such operations aren't explicitly marked as `noexcept`, which means that they may throw exceptions and consumers can't make assumptions about its reliability.
1616

17-
It's important for these operations to be reliable as they're often used to implement operations with certain [exception safety guarantees](https://en.cppreference.com/w/cpp/language/exceptions). A throwing move constructor could also force STL containers to fall back to copy operations and reduce the runtime performance.
17+
It's important for these operations to be reliable as they're often used to implement operations with certain [exception safety guarantees](https://en.cppreference.com/w/cpp/language/exceptions). A throwing move constructor could also force STL containers to fall back to copy operations which reduces runtime performance.
1818

1919
Code analysis name: `SPECIAL_NOEXCEPT`
2020

@@ -31,7 +31,7 @@ Code analysis name: `SPECIAL_NOEXCEPT`
3131

3232
## Example
3333

34-
The tool warns on all functions except the destructor because they're missing noexcept.
34+
The tool warns on all functions except the destructor because they're missing `noexcept`.
3535

3636
```cpp
3737
struct S
@@ -46,7 +46,7 @@ struct S
4646
};
4747
```
4848
49-
With noexcept decorating the same structure, all warnings are removed.
49+
With `noexcept` decorating the same structure, all warnings are removed.
5050
5151
```cpp
5252
struct S

docs/code-quality/c26455.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: kr2b-contr-experiment
1313

1414
> Default constructor should not throw. Declare it '`noexcept`' (f.6)
1515
16-
The C++ Core Guidelines suggest that default constructors shouldn't do anything that can throw. If the default constructor is allowed to throw, other operations relying on creating default constructed objects may also throw.
16+
The C++ Core Guidelines suggest that default constructors shouldn't do anything that can throw. When the default constructor can throw, all code that rely on a properly instantiated object may also throw.
1717

1818
## Remarks
1919

docs/code-quality/c26800.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ helpviewer_keywords: ["C26800"]
1111
1212
## Remarks
1313

14-
Warning C26800 is triggered when variable is used after it has been moved from. A variable is considered moved from after it was passed to a function as rvalue reference. There are some legitimate exceptions for uses such as assignment, destruction, and some state resetting functions such as `std::vector::clear`. After using a state resetting function, we're free to use the variable. This check only reasons about the local variables.
14+
Warning C26800 is triggered when variable is used after it has been moved from. A variable is considered moved from after it is passed to a function as rvalue reference. There are some legitimate exceptions for assignment, destruction, and some state resetting functions such as `std::vector::clear`. After using a state resetting function, we're free to use the variable. This check only reasons about the local variables.
1515

1616
The following methods are considered state resetting methods:
17-
- Functions with the following substring in their name (not considering case sensitivity): "clear", "clean", "reset", "free", "destroy", "release", "dealloc", "assign"
17+
- Functions with the following case-insensitive substring in their name: "clear", "clean", "reset", "free", "destroy", "release", "dealloc", "assign"
1818
- Overloaded assignment operators, destructor
1919

2020
This check respects the `std::swap` operation:

0 commit comments

Comments
 (0)