Skip to content

Commit 44b8595

Browse files
committed
Add example for wildcard template maching in the docs
1 parent 063fac5 commit 44b8595

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,13 @@ fully qualified name (``::std::original``).
118118

119119
Fully qualified names can contain template parameters on certain C++ classes, but not on C++ functions.
120120
Type aliases are resolved before matching.
121+
121122
As an example, the member function ``open`` in the class ``std::ifstream``
122123
has a fully qualified name of ``::std::basic_ifstream<char>::open``.
123124

125+
The example could also be matched with the regex ``::std::basic_ifstream<[^>]*>::open``, which matches all potential
126+
template parameters, but does not match nested template classes.
127+
124128
Options
125129
-------
126130

0 commit comments

Comments
 (0)