summaryrefslogtreecommitdiffstats
path: root/tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp')
-rw-r--r--tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp b/tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp
new file mode 100644
index 0000000000..aac9f7c9f6
--- /dev/null
+++ b/tools/clang-tidy/test/clang-analyzer-core.DivideZero.cpp
@@ -0,0 +1,4 @@
+void test(int z) {
+ if (z == 0)
+ int x = 1 / z;
+}