[all-commits] [llvm/llvm-project] 5bbef2: [clang][dataflow] Fix double visitation of nested ...
Eric Li via All-commits
all-commits at lists.llvm.org
Tue May 17 13:29:17 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5bbef2e3fff123293ed9c2037e2662e352bf37af
https://github.com/llvm/llvm-project/commit/5bbef2e3fff123293ed9c2037e2662e352bf37af
Author: Eric Li <li.zhe.hua at gmail.com>
Date: 2022-05-17 (Tue, 17 May 2022)
Changed paths:
M clang/lib/Analysis/FlowSensitive/Transfer.cpp
M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
Log Message:
-----------
[clang][dataflow] Fix double visitation of nested logical operators
Sub-expressions that are logical operators are not spelled out
separately in basic blocks, so we need to manually visit them when we
encounter them. We do this in both the `TerminatorVisitor`
(conditionally) and the `TransferVisitor` (unconditionally), which can
cause cause an expression to be visited twice when the binary
operators are nested 2+ times.
This changes the visit in `TransferVisitor` to check if it has been
evaluated before trying to visit the sub-expression.
Differential Revision: https://reviews.llvm.org/D125821
More information about the All-commits
mailing list