Fix use-after-free bug in Tooling.
Summary:
`buildASTFromCodeWithArgs()` was creating a memory buffer referencing a
stack-allocated string. This diff changes the implementation to copy the code
string into the memory buffer so that said buffer owns the memory.
Patch by Yitzhak Mandelbaum.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: cfe-commits, EricWF
Differential Revision: https://reviews.llvm.org/D55765
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350638
91177308-0d34-0410-b5e6-
96231b3b80d8