================ @@ -463,6 +463,13 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return true; } + // Array index wasn't an integer literal, let's see if it was an enum or + // something similar + const auto IntConst = Node.getIdx()->getIntegerConstantExpr(Finder->getASTContext()); + if (IntConst && *IntConst > 0 && *IntConst < size) { ---------------- mxms0 wrote:
Yeeep. Good catch, should be fixed :) https://github.com/llvm/llvm-project/pull/117370 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits