From: Jan Kratochvil Date: Tue, 20 Aug 2019 13:25:19 +0000 (+0000) Subject: Regex: +regex string lifetime comment X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4603d6397c4f88dcd3a6f512edd0fa314330d9cd;p=llvm Regex: +regex string lifetime comment Differential Revision: https://reviews.llvm.org/D66464 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369383 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h index 2d19b10fd89..b05349dee88 100644 --- a/include/llvm/Support/Regex.h +++ b/include/llvm/Support/Regex.h @@ -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) {