summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-char-subscripts.cpp
diff options
context:
space:
mode:
authorEdward Jones <ed.jones@embecosm.com>2019-11-07 18:19:09 +0000
committerEdward Jones <ed.jones@embecosm.com>2019-11-07 18:45:40 +0000
commit90ecfa2f5f7feea6e3676d59fe6126e08c52d00e (patch)
tree76a3a1ab86e50125cee027c406a9c2b1b9ee8a84 /clang/test/SemaCXX/warn-char-subscripts.cpp
parent08b5b553083e23008664596a6caa53452a7000c8 (diff)
downloadbcm5719-llvm-90ecfa2f5f7feea6e3676d59fe6126e08c52d00e.tar.gz
bcm5719-llvm-90ecfa2f5f7feea6e3676d59fe6126e08c52d00e.zip
Revert "[Sema] Suppress -Wchar-subscripts if the index is a literal char"
This reverts commit 7adab7719e55e1b29bfd521dcc73f202139e8f41.
Diffstat (limited to 'clang/test/SemaCXX/warn-char-subscripts.cpp')
-rw-r--r--clang/test/SemaCXX/warn-char-subscripts.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/clang/test/SemaCXX/warn-char-subscripts.cpp b/clang/test/SemaCXX/warn-char-subscripts.cpp
index 7760ed0e5eb..84ea536b979 100644
--- a/clang/test/SemaCXX/warn-char-subscripts.cpp
+++ b/clang/test/SemaCXX/warn-char-subscripts.cpp
@@ -14,19 +14,6 @@ void t2() {
int val = subscript[array]; // expected-warning{{array subscript is of type 'char'}}
}
-void t3() {
- int array[50] = { 0 };
- int val = array[' ']; // no warning, subscript is a literal
-}
-void t4() {
- int array[50] = { 0 };
- int val = '('[array]; // no warning, subscript is a literal
-}
-void t5() {
- int array[50] = { 0 };
- int val = array['\x11']; // no warning, subscript is a literal
-}
-
void test() {
t1<char>(); // expected-note {{in instantiation of function template specialization 't1<char>' requested here}}
t2<char>(); // expected-note {{in instantiation of function template specialization 't2<char>' requested here}}
OpenPOWER on IntegriCloud