clang 20.0.0git
|
#include "clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h"
Public Attributes | |
bool | IgnoreSmartPointerDereference = false |
In generating diagnostics, ignore optionals reachable through overloaded operator* or operator-> (other than those of the optional type itself). | |
Definition at line 33 of file UncheckedOptionalAccessModel.h.
In generating diagnostics, ignore optionals reachable through overloaded operator*
or operator->
(other than those of the optional type itself).
The analysis does not equate the results of such calls, so it can't identify when their results are used safely (across calls), resulting in false positives in all such cases. Note: this option does not cover access through operator[]
. FIXME: we currently cache and equate the result of const accessors returning pointers, so cover the case of operator-> followed by operator->, which covers the common case of smart pointers. We also cover some limited cases of returning references (if return type is an optional type), so cover some cases of operator* followed by operator*. We don't cover mixing operator-> and operator*. Once we are confident in this const accessor caching, we shouldn't need the IgnoreSmartPointerDereference option anymore.
Definition at line 48 of file UncheckedOptionalAccessModel.h.