[Sema] Diagnose array access preceding the array bounds even when the base type is...
authorBruno Ricci <riccibrun@gmail.com>
Tue, 8 Jan 2019 13:52:54 +0000 (13:52 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Tue, 8 Jan 2019 13:52:54 +0000 (13:52 +0000)
commitf605e825219bd14d35a2fa4796137acfc20f4215
tree12d0f712aac2a6d1221943e1adeb29cbe0004738
parent32f08399eb298519bf0bffc36ca9eb24b20b33d6
[Sema] Diagnose array access preceding the array bounds even when the base type is incomplete.

When the type of the base expression after IgnoreParenCasts is incomplete,
it is still possible to diagnose an array access which precedes the array
bounds.

This is a follow-up on D55862 which added an early return when the type of
the base expression after IgnoreParenCasts was incomplete.

Differential Revision: https://reviews.llvm.org/D56050

Reviewed By: efriedma

llvm-svn: 350622
clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/array-bounds.cpp