This patch has CheckArrayBounds recurse into
ArraySubscriptExprs and MemberExprs, giving
warnings for invalid indices for every level of
subscript instead of just the topmost one.
Details
Details
- Reviewers
danielmarjamaki aaron.ballman rsmith
Diff Detail
Diff Detail
Event Timeline
lib/Sema/SemaChecking.cpp | ||
---|---|---|
11284 | Can use const auto * here instead of spelling the type out twice. Alternatively, you could skip the local variable entirely if you want. | |
test/SemaCXX/array-bounds.cpp | ||
275 | Can you also add tests for multi[0][2][0] and multi[0][0][2] to more clearly demonstrate that all levels of array indexing are checked? |
Comment Actions
Thank you! I do not have commit rights, so if someone could commit this that would be great.
Can use const auto * here instead of spelling the type out twice. Alternatively, you could skip the local variable entirely if you want.