[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free
Aleksei Sidorin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 14 06:22:17 PDT 2018
a.sidorin updated this revision to Diff 146587.
a.sidorin added a comment.
After a number of attempts of Twine'ifying all Code samples, I decided to restore the initial state of this code.
Repository:
rC Clang
https://reviews.llvm.org/D46398
Files:
unittests/AST/ASTImporterTest.cpp
Index: unittests/AST/ASTImporterTest.cpp
===================================================================
--- unittests/AST/ASTImporterTest.cpp
+++ unittests/AST/ASTImporterTest.cpp
@@ -207,8 +207,8 @@
struct TU {
// Buffer for the context, must live in the test scope.
- StringRef Code;
- StringRef FileName;
+ std::string Code;
+ std::string FileName;
std::unique_ptr<ASTUnit> Unit;
TranslationUnitDecl *TUDecl = nullptr;
TU(StringRef Code, StringRef FileName, ArgVector Args)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46398.146587.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180514/5fd9ff31/attachment.bin>
More information about the cfe-commits
mailing list