summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Frontend/FrontendActionTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Frontend/FrontendActionTest.cpp')
-rw-r--r--clang/unittests/Frontend/FrontendActionTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/unittests/Frontend/FrontendActionTest.cpp b/clang/unittests/Frontend/FrontendActionTest.cpp
index cb9cc527258..f9cf06efd34 100644
--- a/clang/unittests/Frontend/FrontendActionTest.cpp
+++ b/clang/unittests/Frontend/FrontendActionTest.cpp
@@ -65,7 +65,8 @@ private:
TEST(ASTFrontendAction, Sanity) {
CompilerInvocation *invocation = new CompilerInvocation;
invocation->getPreprocessorOpts().addRemappedFile(
- "test.cc", MemoryBuffer::getMemBuffer("int main() { float x; }"));
+ "test.cc",
+ MemoryBuffer::getMemBuffer("int main() { float x; }").release());
invocation->getFrontendOpts().Inputs.push_back(FrontendInputFile("test.cc",
IK_CXX));
invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
@@ -84,7 +85,8 @@ TEST(ASTFrontendAction, Sanity) {
TEST(ASTFrontendAction, IncrementalParsing) {
CompilerInvocation *invocation = new CompilerInvocation;
invocation->getPreprocessorOpts().addRemappedFile(
- "test.cc", MemoryBuffer::getMemBuffer("int main() { float x; }"));
+ "test.cc",
+ MemoryBuffer::getMemBuffer("int main() { float x; }").release());
invocation->getFrontendOpts().Inputs.push_back(FrontendInputFile("test.cc",
IK_CXX));
invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
@@ -128,7 +130,8 @@ public:
TEST(PreprocessorFrontendAction, EndSourceFile) {
CompilerInvocation *Invocation = new CompilerInvocation;
Invocation->getPreprocessorOpts().addRemappedFile(
- "test.cc", MemoryBuffer::getMemBuffer("int main() { float x; }"));
+ "test.cc",
+ MemoryBuffer::getMemBuffer("int main() { float x; }").release());
Invocation->getFrontendOpts().Inputs.push_back(
FrontendInputFile("test.cc", IK_CXX));
Invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
OpenPOWER on IntegriCloud