summaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-self-comparisons.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/warn-self-comparisons.cpp')
-rw-r--r--test/SemaCXX/warn-self-comparisons.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-self-comparisons.cpp b/test/SemaCXX/warn-self-comparisons.cpp
new file mode 100644
index 000000000000..620be195c1de
--- /dev/null
+++ b/test/SemaCXX/warn-self-comparisons.cpp
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+void f(int (&array1)[2], int (&array2)[2]) {
+ if (array1 == array2) { } // no warning
+}