summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/clang-tidy/checks/modernize-use-using.rst
blob: 1456a91f3735708ce16054ebd3399c76cb091bed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. title:: clang-tidy - modernize-use-using

modernize-use-using
===================

The check converts the usage of ``typedef`` with ``using`` keyword.

Before:

.. code-block:: c++

  typedef int variable;

  class Class{};
  typedef void (Class::* MyPtrType)() const;

After:

.. code-block:: c++

  using variable = int;

  class Class{};
  using MyPtrType = void (Class::*)() const;

This check requires using C++11 or higher to run.

Options
-------

.. option:: IgnoreMacros

   If set to non-zero, the check will not give warnings inside macros. Default
   is `1`.
OpenPOWER on IntegriCloud