| 1 |
.. title:: clang-tidy - misc-unused-using-decls |
| 2 |
|
| 3 |
misc-unused-using-decls |
| 4 |
======================= |
| 5 |
|
| 6 |
Finds unused ``using`` declarations. |
| 7 |
|
| 8 |
Unused ``using``` declarations in header files will not be diagnosed since these |
| 9 |
using declarations are part of the header's public API. Allowed header file |
| 10 |
extensions can be configured via the `HeaderFileExtensions` option (see below). |
| 11 |
|
| 12 |
Example: |
| 13 |
|
| 14 |
.. code-block:: c++ |
| 15 |
|
| 16 |
// main.cpp |
| 17 |
namespace n { class C; } |
| 18 |
using n::C; // Never actually used. |
| 19 |
|
| 20 |
Options |
| 21 |
------- |
| 22 |
|
| 23 |
.. option:: HeaderFileExtensions |
| 24 |
|
| 25 |
A semicolon-separated list of filename extensions of header files (the filename |
| 26 |
extensions should not include "." prefix). Default is "h,hh,hpp,hxx". |
| 27 |
For extension-less header files, use an empty string or leave an |
| 28 |
empty string between "," if there are other filename extensions. |