[llvm] 9e709dc - [NFC][Glob] Escape backslash to fix doxygen rendering (#109055)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 14:35:02 PDT 2024


Author: Ellis Hoag
Date: 2024-09-17T16:34:57-05:00
New Revision: 9e709dcb709f0d68eae655f3d5771751abc208a9

URL: https://github.com/llvm/llvm-project/commit/9e709dcb709f0d68eae655f3d5771751abc208a9
DIFF: https://github.com/llvm/llvm-project/commit/9e709dcb709f0d68eae655f3d5771751abc208a9.diff

LOG: [NFC][Glob] Escape backslash to fix doxygen rendering (#109055)

The docs for Glob wasn't rendered correctly, I believe because the `\`
was not properly escaped. I haven't built these docs locally, so I'll
follow up to see if this is fixed after it lands.

https://llvm.org/doxygen/classllvm_1_1GlobPattern.html

Added: 
    

Modified: 
    llvm/include/llvm/Support/GlobPattern.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/GlobPattern.h b/llvm/include/llvm/Support/GlobPattern.h
index 1a722e65bed802..eff8957d1b682e 100644
--- a/llvm/include/llvm/Support/GlobPattern.h
+++ b/llvm/include/llvm/Support/GlobPattern.h
@@ -34,8 +34,8 @@ namespace llvm {
 ///   expansions are not supported. If \p MaxSubPatterns is empty then
 ///   brace expansions are not supported and characters \p "{,}" are treated as
 ///   literals.
-/// * \p "\" escapes the next character so it is treated as a literal.
-///
+/// * \p "\\" (a single backslash) escapes the next character so it is treated
+///   as a literal.
 ///
 /// Some known edge cases are:
 /// * \p "]" is allowed as the first character in a character class, i.e.,
@@ -45,9 +45,8 @@ namespace llvm {
 /// * \p "}" and \p "," that are not inside a brace expansion are taken as
 ///   literals, e.g., \p ",}" is valid but \p "{" is not.
 ///
-///
-/// For example, \p "*[/\\]foo.{c,cpp}" will match (unix or windows) paths to
-/// all files named \p "foo.c" or \p "foo.cpp".
+/// For example, \p "*[/\\\\]foo.{c,cpp}" (with two backslashes) will match
+/// (unix or windows) paths to all files named \p "foo.c" or \p "foo.cpp".
 class GlobPattern {
 public:
   /// \param Pat the pattern to match against


        


More information about the llvm-commits mailing list