Skip to content

Commit b022ed5

Browse files
committed
More acrolinx suggestions.
1 parent 6098567 commit b022ed5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-quality/c26441.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The standard library provides locks to help control concurrent access to resourc
1919

2020
This diagnostic only analyzes the standard lock types `std::scoped_lock`, `std::unique_lock`, and `std::lock_guard`. Warning [C26444](c26444.md) covers other unnamed RAII types.
2121

22-
The analyzer only analyzes simple calls to constructors. More complex initializer expressions may lead to inaccurate results in the form of missed warnings. The analyzer ignores locks passed as arguments to function calls or returned from function calls. It is unable to determine if those locks are deliberately trying to protect that function call or if their [lifetime should be extended](https://abseil.io/tips/107). To provide similar protection for types returned by a function call, annotate them with `[[nodiscard]]`. You can also annotate constructors with `[[nodiscard]]` to avoid unnamed objects of that type:
22+
The analyzer only analyzes simple calls to constructors. More complex initializer expressions may lead to inaccurate results in the form of missed warnings. The analyzer ignores locks passed as arguments to function calls or returned from function calls. It's unable to determine if those locks are deliberately trying to protect that function call or if their [lifetime should be extended](https://abseil.io/tips/107). To provide similar protection for types returned by a function call, annotate them with `[[nodiscard]]`. You can also annotate constructors with `[[nodiscard]]` to avoid unnamed objects of that type:
2323

2424
```cpp
2525
struct X { [[nodiscard]] X(); };
@@ -35,7 +35,7 @@ Code analysis name: `NO_UNNAMED_GUARDS`
3535
3636
## Example
3737
38-
In this example the name of the scoped lock is missing.
38+
In this example, the name of the scoped lock is missing.
3939
4040
```cpp
4141
void print_diagnostic(std::string_view text)

0 commit comments

Comments
 (0)