-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Logical mutations: fix 'dangling' incoming phi-node value
- Loading branch information
1 parent
57ce918
commit 97c37ca
Showing
6 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// clang-format off | ||
|
||
int main() { | ||
int a = 1; | ||
a = a && a && a; | ||
int b = 2; | ||
b = b || b || b; | ||
return 0; | ||
} | ||
|
||
// RUN: %clang_cc %sysroot -O0 %pass_mull_ir_frontend -g %s -o %s.exe | ||
// RUN: unset TERM; %mull_runner -reporters=IDE %s.exe | %filecheck %s --dump-input=fail | ||
// CHECK:[info] Survived mutants (3/3): | ||
// CHECK-NEXT:{{.*}}main.c:5:9: warning: Survived: Replaced && with || [cxx_logical_and_to_or] | ||
// CHECK-NEXT: a = a && a && a; | ||
// CHECK-NEXT: ^ | ||
// CHECK-NEXT:{{.*}}main.c:5:14: warning: Survived: Replaced && with || [cxx_logical_and_to_or] | ||
// CHECK-NEXT: a = a && a && a; | ||
// CHECK-NEXT: ^ | ||
// CHECK-NEXT:{{.*}}main.c:7:9: warning: Survived: Replaced || with && [cxx_logical_or_to_and] | ||
// CHECK-NEXT: b = b || b || b; | ||
// CHECK-NEXT: ^ | ||
// CHECK-NEXT:[info] Mutation score: 0% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mutators: | ||
- cxx_logical_and_to_or | ||
- cxx_logical_or_to_and |