Issue 58097
Summary `bugprone-unchecked-optional-access` does something even if no `optional` implementation is available
Labels new issue
Assignees
Reporter firewave
    https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132 indicates that `bugprone-unchecked-optional-access` is in the upper third in terms of heaviness. This applies even if your are not using optional at all since you require either C++17 (`std`), the abseil library (`absl::`) or (apparently) the `chromium` project (`base::`).

It should be smarter about this and not do anything if these objects are not available.

The list of the objects to be checked should probably be configurable as well allowing additional optional implementations to be supported. It doesn't support `Boost.Optional` or `llvm::Optional` which is a bit strange as those are probably more wide-spread than the currently supported custom implementations.

This configuration could also offer another way to mitigate this issue by supporting an empty list essentially disabling the check.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to