Skip to content

Commit ade740c

Browse files
committed
Add note about matching C++ member functions
1 parent 3bec1ac commit ade740c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ qualified name (i.e. ``std::original``), otherwise the regex is matched against
114114
If the regular expression starts with `::` (or `^::`), it is matched against the
115115
fully qualified name (``::std::original``).
116116

117+
.. note::
118+
119+
Fully qualified names can contain template parameters on certain C++ classes, but not on C++ functions.
120+
Type aliases are resolved before matching.
121+
As an example, the member function ``open`` in the class ``std::ifstream``
122+
has a fully qualified name of ``::std::basic_ifstream<char>::open``.
123+
117124
To aid with finding the fully qualified names of expressions, the option ``ShowFullyQualifiedNames`` can be used.
118125
This option will show the fully qualified name of all functions matched by the custom function matchers.
119126

0 commit comments

Comments
 (0)