Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugprone-unchecked-optional-access should support user-configurable std::optional-like classes #64037

Open
carlosgalvezp opened this issue Jul 22, 2023 · 1 comment
Labels
clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang-tidy code-quality enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@carlosgalvezp
Copy link
Contributor

carlosgalvezp commented Jul 22, 2023

Currently, the check hardcodes the following names for accepted std::optional-like classes:

  • std::optional
  • absl::optional
  • base::Optional

Recently, a patch is adding support for yet another project - folly::Optional.

It would be good to not hardcode these project-specific names inside the source code, and instead make this user-configurable.

@carlosgalvezp carlosgalvezp added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature clang-tidy code-quality clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html labels Jul 22, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 22, 2023

@llvm/issue-subscribers-clang-tidy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang-tidy code-quality enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

2 participants