<p dir="ltr">Thanks for the fix!</p>
<div class="gmail_quote">On 6 Mar 2015 00:22, "Daniel Jasper" <<a href="mailto:djasper@google.com">djasper@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: djasper<br>
Date: Thu Mar  5 17:17:32 2015<br>
New Revision: 231421<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=231421&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=231421&view=rev</a><br>
Log:<br>
Use std::string instead of StringRef to prevent use-after-free.<br>
<br>
Discovered by asan.<br>
<br>
Modified:<br>
    clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp?rev=231421&r1=231420&r2=231421&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp?rev=231421&r1=231420&r2=231421&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp Thu Mar  5 17:17:32 2015<br>
@@ -83,7 +83,7 @@ void NamespaceCommentCheck::check(const<br>
   bool NeedLineBreak = NextTokenIsOnSameLine && Tok.isNot(tok::eof);<br>
<br>
   SourceRange OldCommentRange(AfterRBrace, AfterRBrace);<br>
-  StringRef Message = "%0 not terminated with a closing comment";<br>
+  std::string Message = "%0 not terminated with a closing comment";<br>
<br>
   // Try to find existing namespace closing comment on the same line.<br>
   if (Tok.is(tok::comment) && NextTokenIsOnSameLine) {<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>