[clang-tidy] Fix false positive on ArrayInitIndexExpr inside ProBoundsConstantArrayIndexCheck
Sometimes in the AST we can have an ArraySubscriptExpr, where the index is an ArrayInitIndexExpr. ArrayInitIndexExpr is not a constant, so ProBoundsConstantArrayIndexCheck reports a warning when it sees such expression. This expression can only be implicitly generated, and always appears inside an ArrayInitLoopExpr, so we shouldn't report a warning. Differential Revision: https://reviews.llvm.org/D132654
Loading
Please sign in to comment