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

llvm-svn: 369383

llvm/include/llvm/Support/Regex.h

index 2d19b10..b05349d 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) {