aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2011-09-17 22:59:41 +0000
committerNico Weber <nicolasweber@gmx.de>2011-09-17 22:59:41 +0000
commitde5998f1d7dcecb777257ec932142d65de636eb8 (patch)
tree89bd6d2db8f765ec2f19ce02eca03ec756b4a88a /lib/Sema/SemaChecking.cpp
parent1d4e8e9340c9699069a33a74562e883a305f7607 (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.cpp2
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);