================ @@ -0,0 +1,29 @@ +.. title:: clang-tidy - bugprone-unused-local-non-trivial-variable + +bugprone-unused-local-non-trivial-variable +========================================== + +Warns when a local non trivial variable is unused within a function. + +In the following example, `future2` would generate a warning that it is unused. + +.. code-block:: c++ + + std::future<MyObject> future1; + std::future<MyObject> future2; + // ... + MyObject foo = future1.get(); + // future2 is not used. + +Options +------- + +.. option:: IncludeTypeRegex + + Semicolon-separated list of regular expressions matching types of variables to check. + By default it 'std::.*mutex;std::future'. + +.. option:: ExcludeTypeRegex + + A semicolon-separated list of regular expressions matching types that are excluded from the + 'IncludeTypeRegex' matches. By default it is an empty list. ---------------- EugeneZelenko wrote:
Ditto. https://github.com/llvm/llvm-project/pull/76101 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits