Thanks for the fix! On 6 Mar 2015 00:22, "Daniel Jasper" <[email protected]> wrote:
> Author: djasper > Date: Thu Mar 5 17:17:32 2015 > New Revision: 231421 > > URL: http://llvm.org/viewvc/llvm-project?rev=231421&view=rev > Log: > Use std::string instead of StringRef to prevent use-after-free. > > Discovered by asan. > > Modified: > > clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp > > Modified: > clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp > URL: > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp?rev=231421&r1=231420&r2=231421&view=diff > > ============================================================================== > --- > clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp > (original) > +++ > clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp > Thu Mar 5 17:17:32 2015 > @@ -83,7 +83,7 @@ void NamespaceCommentCheck::check(const > bool NeedLineBreak = NextTokenIsOnSameLine && Tok.isNot(tok::eof); > > SourceRange OldCommentRange(AfterRBrace, AfterRBrace); > - StringRef Message = "%0 not terminated with a closing comment"; > + std::string Message = "%0 not terminated with a closing comment"; > > // Try to find existing namespace closing comment on the same line. > if (Tok.is(tok::comment) && NextTokenIsOnSameLine) { > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
