PiotrZSL added a comment. As for `takeOptionalValue(std::move(*param));`, it could be added as an configuration option for PassthroughFunctions or UtilityFunctions. I can thing about that, that should be easy to implement.
================ Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/optional-value-conversion.rst:34 +Value extraction using ``operator *`` is matched by default. +Check does not provide auto-fixes. + ---------------- njames93 wrote: > Any reason for this limitation, given in most cases the fix is to just remove > the `*` or `.value()` call Sometimes problem is not with optional but with called function that take optional when it could take value. At least for such issues I run, still probably could be safe to introduce such auto-fix to just remove */.value(). But then question would be if it should be bugprone or readability check. For me like 10% of these issues show some possible bug around that code. ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/optional-value-conversion.cpp:16 + }; +} + ---------------- njames93 wrote: > It'd be good to have tests demonstating `boost::optional` and > `absl::optional` as well as the (non standard) get accessor I added them to config just to add them, as they should work, I could add some tests for them, but behavior should be same... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits