[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 4 01:14:47 PDT 2018


martong added inline comments.


================
Comment at: unittests/AST/ASTImporterTest.cpp:211
     StringRef Code;
     StringRef FileName;
     std::unique_ptr<ASTUnit> Unit;
----------------
Can't we have the same problem with FileName?

Perhaps an other alternative would be to make the members real strings.
```
std::string Code;
std::string FileName;
```


Repository:
  rC Clang

https://reviews.llvm.org/D46398





More information about the cfe-commits mailing list