diff options
author | Nico Weber <nicolasweber@gmx.de> | 2011-09-17 22:59:41 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2011-09-17 22:59:41 +0000 |
commit | de5998f1d7dcecb777257ec932142d65de636eb8 (patch) | |
tree | 89bd6d2db8f765ec2f19ce02eca03ec756b4a88a /lib/Sema/SemaChecking.cpp | |
parent | 1d4e8e9340c9699069a33a74562e883a305f7607 (diff) |
Let -Warray-bounds handle casted array types without false positives.
Fixes PR10771.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 6e750c182b..aecc659485 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -3709,7 +3709,7 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, return; const Type* BaseType = getElementType(BaseExpr); - if (!isSubscript && BaseType != EffectiveType) { + if (BaseType != EffectiveType) { // Make sure we're comparing apples to apples when comparing index to size uint64_t ptrarith_typesize = Context.getTypeSize(EffectiveType); uint64_t array_typesize = Context.getTypeSize(BaseType); |