[dataflow] use true/false literals in formulas, rather than variables
authorSam McCall <sam.mccall@gmail.com>
Thu, 22 Jun 2023 00:05:12 +0000 (02:05 +0200)
committerSam McCall <sam.mccall@gmail.com>
Wed, 5 Jul 2023 12:06:48 +0000 (14:06 +0200)
commit71579569f4399d3cf6bc618dcd449b5388d749cc
treef33efb20a4326de892c8f2229b6369daa0d22400
parent8a3fdf7b908978625e9a7e57fbb443e4e6f98976
[dataflow] use true/false literals in formulas, rather than variables

And simplify formulas containing true/false
It's unclear to me how useful this is, it does make formulas more
conveniently self-contained now (we can usefully print them without
carrying around the "true/false" labels)

(while here, simplify !!X to X, too)

Differential Revision: https://reviews.llvm.org/D153485
clang/include/clang/Analysis/FlowSensitive/Arena.h
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
clang/include/clang/Analysis/FlowSensitive/Formula.h
clang/lib/Analysis/FlowSensitive/Arena.cpp
clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
clang/lib/Analysis/FlowSensitive/Formula.cpp
clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp
clang/unittests/Analysis/FlowSensitive/ArenaTest.cpp
clang/unittests/Analysis/FlowSensitive/DebugSupportTest.cpp
clang/unittests/Analysis/FlowSensitive/TestingSupport.h
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp