Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thx Dmitry!
Usama, I heard you have plans to make isUnevaluated() consume statements so that you could feed the entire loop into the machine without separating it into parts. You can either update this patch or do that as a follow-up patch.
Also I think it's time for you to ask for commit access, so please do! (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access)
Added a separate check for unevaluated statements. Updated InfiniteLoopCheck to use new check
clang/include/clang/Analysis/Analyses/ExprMutationAnalyzer.h | ||
---|---|---|
43–44 | I suspect this may lead to subtle bugs when a Stmt * that actually points to an Expr at runtime would cause the first overload to be chosen. Maybe teach canResolveToExpr() to accept an Stmt instead (with early return)? | |
clang/lib/Analysis/ExprMutationAnalyzer.cpp | ||
202–204 | We're trying to avoid auto when it makes the code less readable i.e. when the type isn't obvious from the context (https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable). |
- updated canResolveToExpr to accept both statements and expressions. Removed unnecessary code
clang/lib/Analysis/ExprMutationAnalyzer.cpp | ||
---|---|---|
234–236 | Shouldn't this one be removed now? |
Whoops, no, this isn't an actual concern. Looks good then, please commit!
clang/lib/Analysis/ExprMutationAnalyzer.cpp | ||
---|---|---|
234–236 | Nvm, it's the old interface. |
I suspect this may lead to subtle bugs when a Stmt * that actually points to an Expr at runtime would cause the first overload to be chosen.
Maybe teach canResolveToExpr() to accept an Stmt instead (with early return)?