diff options
Diffstat (limited to 'clang-tools-extra/unittests/clang-tidy/ExprMutationAnalyzerTest.cpp')
-rw-r--r-- | clang-tools-extra/unittests/clang-tidy/ExprMutationAnalyzerTest.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang-tools-extra/unittests/clang-tidy/ExprMutationAnalyzerTest.cpp b/clang-tools-extra/unittests/clang-tidy/ExprMutationAnalyzerTest.cpp index 498aa7cdfd8..fd4a726183b 100644 --- a/clang-tools-extra/unittests/clang-tidy/ExprMutationAnalyzerTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/ExprMutationAnalyzerTest.cpp @@ -579,10 +579,9 @@ TEST(ExprMutationAnalyzerTest, UnevaluatedExpressions) { Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); EXPECT_FALSE(isMutated(Results, AST.get())); - AST = - tooling::buildASTFromCodeWithArgs("namespace std { class type_info; }" - "void f() { int x; typeid(x = 10); }", - std::vector<std::string> ({"-frtti"})); + AST = tooling::buildASTFromCodeWithArgs("namespace std { class type_info; }" + "void f() { int x; typeid(x = 10); }", + std::vector<std::string>({"-frtti"})); Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); EXPECT_FALSE(isMutated(Results, AST.get())); @@ -602,7 +601,7 @@ TEST(ExprMutationAnalyzerTest, NotUnevaluatedExpressions) { "namespace std { class type_info; }" "struct A { virtual ~A(); }; struct B : A {};" "struct X { A& f(); }; void f() { X x; typeid(x.f()); }", - std::vector<std::string> ({"-frtti"})); + std::vector<std::string>({"-frtti"})); Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.f()")); } |