[llvm] r369383 - Regex: +regex string lifetime comment

Jan Kratochvil via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 06:25:19 PDT 2019


Author: jankratochvil
Date: Tue Aug 20 06:25:19 2019
New Revision: 369383

URL: http://llvm.org/viewvc/llvm-project?rev=369383&view=rev
Log:
Regex: +regex string lifetime comment

Differential Revision: https://reviews.llvm.org/D66464

Modified:
    llvm/trunk/include/llvm/Support/Regex.h

Modified: llvm/trunk/include/llvm/Support/Regex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Regex.h?rev=369383&r1=369382&r2=369383&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Regex.h (original)
+++ llvm/trunk/include/llvm/Support/Regex.h Tue Aug 20 06:25:19 2019
@@ -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) {




More information about the llvm-commits mailing list