llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Consider removing support for `base::Optional`from `bugprone-unchecked-optional-access`

Open jvoung opened this issue 8 months ago • 1 comments

  • base::Optional from Chromium was replaced with absl::optional in 2021 https://source.chromium.org/chromium/chromium/src/+/7dd58adeb690920a7474b4f7c5d71d23b15d4698 and https://docs.google.com/document/d/1xK8E9HyNJW8_zHNLOwFZC5cU9QJj6sK7gXkYCMjbrBQ/edit?tab=t.0

  • and then absl::optional is also now removed https://github.com/abseil/abseil-cpp/commit/22b1f421fa678434722202f2a883a565b7de5343 (early 2025)

I'm not sure how many users are stuck on old versions of the library, but it has been a while since Chromium's base::Optional removal.

Abseil LTS has a 2 year window (https://abseil.io/about/releases), so that one could wait a bit more.

jvoung avatar Mar 17 '26 12:03 jvoung

@llvm/issue-subscribers-clang-tidy

Author: Jan Voung (jvoung)

- `base::Optional` from Chromium was replaced with `absl::optional` in 2021 https://source.chromium.org/chromium/chromium/src/+/7dd58adeb690920a7474b4f7c5d71d23b15d4698 and https://docs.google.com/document/d/1xK8E9HyNJW8_zHNLOwFZC5cU9QJj6sK7gXkYCMjbrBQ/edit?tab=t.0
  • and then absl::optional is also now removed https://github.com/abseil/abseil-cpp/commit/22b1f421fa678434722202f2a883a565b7de5343 (early 2025)

I'm not sure how many users are stuck on old versions of the library, but it has been a while since Chromium's base::Optional removal.

Abseil LTS has a 2 year window (https://abseil.io/about/releases), so that one could wait a bit more.

llvmbot avatar Mar 17 '26 13:03 llvmbot