summaryrefslogtreecommitdiffstats
path: root/cocci/unreachable.spatch
diff options
context:
space:
mode:
Diffstat (limited to 'cocci/unreachable.spatch')
-rw-r--r--cocci/unreachable.spatch19
1 files changed, 19 insertions, 0 deletions
diff --git a/cocci/unreachable.spatch b/cocci/unreachable.spatch
new file mode 100644
index 0000000..84c0c34
--- /dev/null
+++ b/cocci/unreachable.spatch
@@ -0,0 +1,19 @@
+@@
+@@
+
+- INSIST(0);
++ UNREACHABLE();
+ ... when != UNREACHABLE();
+
+@@
+@@
+
+- INSIST(0);
+- ISC_UNREACHABLE();
++ UNREACHABLE();
+
+@@
+@@
+
+- UNREACHABLE();
+ UNREACHABLE();