diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-06-08 19:50:34 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-06-08 19:50:34 +0000 |
| commit | ec170db73d501d73c9e1b08178ea7ad325ceeb38 (patch) | |
| tree | 47217ecc63b3e8f4c666403586db136b020c66c1 /clang/test/SemaCXX/warn-self-comparisons.cpp | |
| parent | 61b5ff5ab4e5848e5e98b811cf0accf5d3b8db22 (diff) | |
| download | bcm5719-llvm-ec170db73d501d73c9e1b08178ea7ad325ceeb38.tar.gz bcm5719-llvm-ec170db73d501d73c9e1b08178ea7ad325ceeb38.zip | |
Warn about comparisons between arrays and improve self-comparison
warnings, from Troy Straszheim! Fixes PR6163.
llvm-svn: 105631
Diffstat (limited to 'clang/test/SemaCXX/warn-self-comparisons.cpp')
| -rw-r--r-- | clang/test/SemaCXX/warn-self-comparisons.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn-self-comparisons.cpp b/clang/test/SemaCXX/warn-self-comparisons.cpp new file mode 100644 index 00000000000..620be195c1d --- /dev/null +++ b/clang/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 +} |

