AutosarC++17_10-M7.5.1

A function shall not return a reference or a pointer to an automatic variable (including parameters), defined within the function

Required inputs: IR

This rule will detect when a reference or pointer to a local variable is returned from a function. Such a reference or pointer will be dangling, and any access will cause a use-after-free error.
See Also
Rule Miscellaneous-NoLeakingReferenceToLocal

Note

For legal reasons, this rule’s description is not part of the public documentation.