[Sema] Suppress -Wchar-subscripts if the index is a literal char
authorEdward Jones <ed.jones@embecosm.com>
Thu, 7 Nov 2019 15:44:38 +0000 (15:44 +0000)
committerEdward Jones <ed.jones@embecosm.com>
Thu, 7 Nov 2019 15:45:44 +0000 (15:45 +0000)
commit7adab7719e55e1b29bfd521dcc73f202139e8f41
tree064a97407b61d7908722dfa6276f22258d0c41c8
parent343597789eba1e6482e130b0c1b0818b1432d311
[Sema] Suppress -Wchar-subscripts if the index is a literal char

Assume that the user knows what they're doing if they provide a char
literal as an array index. This more closely matches the behavior of
GCC.

Differential Revision: https://reviews.llvm.org/D58896
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/warn-char-subscripts.cpp