Skip to content

[NFC][analyzer] Cleanup checker calls in ExprEngine::ProcessStmt, ExprEngine::Visit* - #218691

Open
tigbr wants to merge 31 commits into
llvm:mainfrom
tigbr:csa-refactor-process-stmt2
Open

[NFC][analyzer] Cleanup checker calls in ExprEngine::ProcessStmt, ExprEngine::Visit*#218691
tigbr wants to merge 31 commits into
llvm:mainfrom
tigbr:csa-refactor-process-stmt2

Conversation

@tigbr

@tigbr tigbr commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Begin standardizing how PreStmt checkers and PostStmt checkers are called by the analyzer engine. Previously, checkers were called either from ExprEngine::Visit or the visit method of the statement. Now this logic was hoisted out into ExprEngine::ProcessStmt and most of the checker calls happen from there.

There are several statement kinds that do not call checkers at all or only call PreVisit or only call PostVisit checkers. There are also statement kinds whose visit code does not easily lend itself to the PreVisit, Visit, PostVisit scheme, so those have been left unmodified and will be refactored in a separate patch. The checker calling status of statement kinds have been documented in the function shouldJustCallCheckers.

tigbr added 30 commits August 24, 2026 08:40
These are handled by the same code and currently implemented inline
in the switch, i.e. have no dedicated visit method.
`Expr::ObjCDictionaryLiteralClass`, `Expr::ObjCBoxedExprClass`,

These are handled by the same code and currently implemented inline
in the switch, i.e. have no dedicated visit method.
…tVisit`

into the function `shouldJustCallCheckers` and also document status of each
statement kind.
@tigbr
tigbr requested review from NagyDonat and steakhal August 25, 2026 14:02
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

✅ With the latest revision this PR passed the C/C++ code formatter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant