Details
-
Type:
False-Positive
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 6.18
-
Fix Version/s: Subject: Mutation Analyzer, Importance: Relevant, Level: Medium
-
Labels:None
Description
Enable these two tests:
TEST(PotentialFavorMutationTest, NestedStructInFunctionPtrMutation) { const auto ast = buildASTFromCode("void f() {" " static int x{0};" " struct S { int* ptr = &x; void m() {*ptr=1;} } s;" " s.m();" "}"); const auto ResultDecl = match(withEnclosingCompound(declName("x")), ast->getASTContext()); EXPECT_TRUE(isDeclMutated(ResultDecl, ast.get())); } TEST(PotentialFavorMutationTest, NestedStructInFunctionRefMutation) { const auto ast = buildASTFromCode("void f() {" " static int x{0};" " struct S { int& ref = x; void m() {ref=1;} } s;" " s.m();" "}"); const auto ResultDecl = match(withEnclosingCompound(declName("x")), ast->getASTContext()); EXPECT_TRUE(isDeclMutated(ResultDecl, ast.get())); }