summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp')
-rw-r--r--clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp b/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
index 9c6bc783b33..68c921e4398 100644
--- a/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
+++ b/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
@@ -11,6 +11,7 @@
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Tooling/Tooling.h"
+#include "llvm/ADT/SmallString.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cctype>
@@ -32,7 +33,9 @@ using StmtMatcher = internal::Matcher<Stmt>;
std::unique_ptr<ASTUnit>
buildASTFromCodeWithArgs(const Twine &Code,
const std::vector<std::string> &Args) {
- auto AST = tooling::buildASTFromCodeWithArgs(Code, Args);
+ SmallString<1024> CodeStorage;
+ auto AST =
+ tooling::buildASTFromCodeWithArgs(Code.toStringRef(CodeStorage), Args);
EXPECT_FALSE(AST->getDiagnostics().hasErrorOccurred());
return AST;
}
OpenPOWER on IntegriCloud