Miscellaneous-NoLeakingReferenceToLocal¶
Do not assign to some nonlocal object a reference or pointer to a local variable
Required inputs: IR
See Also
Rule GeneralPurpose-ReferenceToLocalVariablePossible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
possibly_leaking_reference_to_local_variable |
Potentially leaking reference/pointer to local variable. |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
additional_pointer_returns¶
additional_pointer_returns : set[str] = set()
allow_longer_living_local¶
allow_longer_living_local : bool = True
consider_constructors_as_capturing¶
consider_constructors_as_capturing : bool = False
consider_pointer_returns¶
consider_pointer_returns : bool = False
std::string::data
consider_std_addressof¶
consider_std_addressof : bool = True
std::addressof as an address-taking operation.