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 now cache and equate the result of const accessors that look like unique_ptr, have both ->
(returning a pointer type) and *
(returning a reference type). This includes mixing ->
and *
in a sequence of calls as long as the object is not modified. Once we are confident in this const accessor caching, we shouldn't need the IgnoreSmartPointerDereference option anymore.
Definition at line 47 of file UncheckedOptionalAccessModel.h.