Skip to content

Commit 9ec4f47

Browse files
authored
[GlobPattern] Fix doxygen docs (#124361)
Fix the docs for the `GlobPattern` class. https://llvm.org/docs/doxygen/classllvm_1_1GlobPattern.html I've tried to fix this a few times, but I finally got around to building `doxygen-llvm` to verify that my fixed worked. For some reason, `\p` does not work well with `/`. Instead I'm using <code>`</code> to make a codespan, which is more correct anyway. https://www.doxygen.nl/manual/markdown.html#md_codespan
1 parent 654b763 commit 9ec4f47

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

llvm/include/llvm/Support/GlobPattern.h

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,32 @@
2222
namespace llvm {
2323

2424
/// This class implements a glob pattern matcher similar to the one found in
25-
/// bash, but with some key differences. Namely, that \p "*" matches all
25+
/// bash, but with some key differences. Namely, that `*` matches all
2626
/// characters and does not exclude path separators.
2727
///
28-
/// * \p "?" matches a single character.
29-
/// * \p "*" matches zero or more characters.
30-
/// * \p "[<chars>]" matches one character in the bracket. Character ranges,
31-
/// e.g., \p "[a-z]", and negative sets via \p "[^ab]" or \p "[!ab]" are also
28+
/// * `?` matches a single character.
29+
/// * `*` matches zero or more characters.
30+
/// * `[<chars>]` matches one character in the bracket. Character ranges,
31+
/// e.g., `[a-z]`, and negative sets via `[^ab]` or `[!ab]` are also
3232
/// supported.
33-
/// * \p "{<glob>,...}" matches one of the globs in the list. Nested brace
33+
/// * `{<glob>,...}` matches one of the globs in the list. Nested brace
3434
/// expansions are not supported. If \p MaxSubPatterns is empty then
35-
/// brace expansions are not supported and characters \p "{,}" are treated as
35+
/// brace expansions are not supported and characters `{,}` are treated as
3636
/// literals.
37-
/// * \p "\\" (a single backslash) escapes the next character so it is treated
38-
/// as a literal.
37+
/// * `\` escapes the next character so it is treated as a literal.
3938
///
4039
/// Some known edge cases are:
41-
/// * \p "]" is allowed as the first character in a character class, i.e.,
42-
/// \p "[]]" is valid and matches the literal \p "]".
43-
/// * The empty character class, i.e., \p "[]", is invalid.
44-
/// * Empty or singleton brace expansions, e.g., \p "{}", \p "{a}", are invalid.
45-
/// * \p "}" and \p "," that are not inside a brace expansion are taken as
46-
/// literals, e.g., \p ",}" is valid but \p "{" is not.
40+
/// * The literal `]` is allowed as the first character in a character class,
41+
/// i.e., `[]]` is valid and matches the literal `]`.
42+
/// * The empty character class, i.e., `[]`, is invalid.
43+
/// * Empty or singleton brace expansions, e.g., `{}`, `{a}`, are invalid.
44+
/// * The literals `}` and `,` that are not inside a brace expansion are taken
45+
/// as literals, e.g., `,}` is valid but `{` is not.
4746
///
48-
/// For example, \p "*[/\\\\]foo.{c,cpp}" (with two backslashes) will match
49-
/// (unix or windows) paths to all files named \p "foo.c" or \p "foo.cpp".
47+
/// Examples:
48+
/// * `*[/\\]foo.{c,cpp}` will match (unix or windows) paths to files named
49+
/// `foo.c` or `foo.cpp`.
50+
/// * `_Z{N,NK,}S[tabsoid]*` will match mangled C++ standard library functions.
5051
class GlobPattern {
5152
public:
5253
/// \param Pat the pattern to match against

0 commit comments

Comments
 (0)