diff options
author | Edward Jones <ed.jones@embecosm.com> | 2019-11-07 18:19:09 +0000 |
---|---|---|
committer | Edward Jones <ed.jones@embecosm.com> | 2019-11-07 18:45:40 +0000 |
commit | 90ecfa2f5f7feea6e3676d59fe6126e08c52d00e (patch) | |
tree | 76a3a1ab86e50125cee027c406a9c2b1b9ee8a84 /clang/lib/Sema/SemaExpr.cpp | |
parent | 08b5b553083e23008664596a6caa53452a7000c8 (diff) | |
download | bcm5719-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/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 2842e7199b1..e41cd5b6653 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -4741,8 +4741,7 @@ Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, if ((IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_U)) - && !IndexExpr->isTypeDependent() - && !isa<CharacterLiteral>(IndexExpr)) + && !IndexExpr->isTypeDependent()) Diag(LLoc, diag::warn_subscript_is_char) << IndexExpr->getSourceRange(); // C99 6.5.2.1p1: "shall have type "pointer to *object* type". Similarly, |