================
@@ -3292,149 +3626,125 @@ void ExprEngine::VisitArraySubscriptExpr(const
ArraySubscriptExpr *A,
bool IsGLValueLike = A->isGLValue() ||
(A->getType().isCForbiddenLValueType() && !AMgr.getLangOpts().CPlusPlus);
- for (auto *Node : CheckerPreStmt) {
- const StackFrame *SF = Node->getStackFrame();
- ProgramStateRef state = Node->getState();
-
- if (IsGLValueLike) {
- QualType T = A->getType();
-
- // One of the forbidden LValue types! We still need to have sensible
- // symbolic locations to represent this stuff. Note that arithmetic on
- // void pointers is a GCC extension.
- if (T->isVoidType())
- T = getContext().CharTy;
-
- SVal V = state->getLValue(T, state->getSVal(Idx, SF),
- state->getSVal(Base, SF));
- EvalSet.insert(
- Engine.makeNodeWithBinding(Node, A, V,
ProgramPoint::PostLValueKind));
- } else if (IsVectorType) {
- // FIXME: non-glvalue vector reads are not modelled.
- EvalSet.insert(Engine.makePostStmtNode(A, state, Node));
- } else {
- llvm_unreachable("Array subscript should be an lValue when not \
-a vector and not a forbidden lvalue type");
- }
- }
+ const StackFrame *SF = Pred->getStackFrame();
+ ProgramStateRef state = Pred->getState();
+
+ if (IsGLValueLike) {
+ QualType T = A->getType();
- getCheckerManager().runCheckersForPostStmt(Dst, EvalSet, A, *this);
+ // One of the forbidden LValue types! We still need to have sensible
+ // symbolic locations to represent this stuff. Note that arithmetic on
+ // void pointers is a GCC extension.
+ if (T->isVoidType())
+ T = getContext().CharTy;
+
+ SVal V =
+ state->getLValue(T, state->getSVal(Idx, SF), state->getSVal(Base, SF));
+ Dst.insert(
+ Engine.makeNodeWithBinding(Pred, A, V, ProgramPoint::PostLValueKind));
+ } else if (IsVectorType) {
+ // FIXME: non-glvalue vector reads are not modelled.
+ Dst.insert(Engine.makePostStmtNode(A, state, Pred));
+ } else {
+ llvm_unreachable("Array subscript should be an lValue when not \
+a ctor and not a forbidden lvalue type");
----------------
tigbr wrote:
That must have been an accidental change. I will change it back to vector.
https://github.com/llvm/llvm-project/pull/218691
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits