R.5 (scoped objects): Remove `auto` from Enforcement section (#1979)

The enforcement rule on "an object is allocated and then deallocated on all paths" is not _specifically_ about objects declared by the `auto` keyword, and `auto` does not just mean "automatic storage duration" anymore.
pull/1984/head
Niels Dekker 3 years ago committed by GitHub
parent 8181873753
commit 40ce5d12c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9562,7 +9562,7 @@ Instead, use a local variable:
##### Enforcement
* (Moderate) Warn if an object is allocated and then deallocated on all paths within a function. Suggest it should be a local `auto` stack object instead.
* (Moderate) Warn if an object is allocated and then deallocated on all paths within a function. Suggest it should be a local stack object instead.
* (Simple) Warn if a local `Unique_pointer` or `Shared_pointer` is not moved, copied, reassigned or `reset` before its lifetime ends.
### <a name="Rr-global"></a>R.6: Avoid non-`const` global variables

Loading…
Cancel
Save