]> granicus.if.org Git - clang/commit
[ASTImporter] Turn StringRefs back to std::strings to avoid use-after-free
authorAleksei Sidorin <a.sidorin@samsung.com>
Mon, 14 May 2018 16:12:31 +0000 (16:12 +0000)
committerAleksei Sidorin <a.sidorin@samsung.com>
Mon, 14 May 2018 16:12:31 +0000 (16:12 +0000)
commit49c08905862b821364860640b9b9f57d8e4f2cc3
tree6a4ffe0b90974f935ad8a0a403049be624739dca
parentcfbf163f3a7e7b19a018d2649cf9c658f863d679
[ASTImporter] Turn StringRefs back to std::strings to avoid use-after-free

This is a workaround for the issue in buildASTFromCodeWithArgs()
where a local buffer can be used to store the program text
referred by SourceManager.
FIXME: Fix the root issue in buildASTFromCodeWithArgs().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332256 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/AST/ASTImporterTest.cpp