]> granicus.if.org Git - llvm/commitdiff
Regex: +regex string lifetime comment
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 20 Aug 2019 13:25:19 +0000 (13:25 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 20 Aug 2019 13:25:19 +0000 (13:25 +0000)
Differential Revision: https://reviews.llvm.org/D66464

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369383 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Regex.h

index 2d19b10fd890762283038e8e0f868e4d4d1f6839..b05349dee8888f92e5f1730895d347f302df4006 100644 (file)
@@ -44,6 +44,9 @@ namespace llvm {
 
     Regex();
     /// Compiles the given regular expression \p Regex.
+    ///
+    /// \param Regex - referenced string is no longer needed after this
+    /// constructor does finish.  Only its compiled form is kept stored.
     Regex(StringRef Regex, unsigned Flags = NoFlags);
     Regex(const Regex &) = delete;
     Regex &operator=(Regex regex) {