bolt/deps/llvm-18.1.8/clang-tools-extra/docs/clang-tidy/checks/llvm/twine-local.rst

17 lines
321 B
ReStructuredText
Raw Normal View History

2025-02-14 19:21:04 +01:00
.. title:: clang-tidy - llvm-twine-local
llvm-twine-local
================
Looks for local ``Twine`` variables which are prone to use after frees and
should be generally avoided.
.. code-block:: c++
static Twine Moo = Twine("bark") + "bah";
// becomes
static std::string Moo = (Twine("bark") + "bah").str();