diff options
Diffstat (limited to 'clang/test/SemaCXX/self-comparison.cpp')
-rw-r--r-- | clang/test/SemaCXX/self-comparison.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/self-comparison.cpp b/clang/test/SemaCXX/self-comparison.cpp index fb15ec84306..2af19abb30a 100644 --- a/clang/test/SemaCXX/self-comparison.cpp +++ b/clang/test/SemaCXX/self-comparison.cpp @@ -21,3 +21,7 @@ struct A { return a == c; // expected-warning {{array comparison always evaluates to false}} } }; + +namespace NA { extern "C" int x[3]; } +namespace NB { extern "C" int x[3]; } +bool k = NA::x == NB::x; // expected-warning {{self-comparison always evaluates to true}} |