[clang] 1b1b525 - [clang][dataflow] Use `Formula::isLiteral()` in a couple more places. (#78404)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 23:58:52 PST 2024


Author: martinboehme
Date: 2024-01-18T08:58:47+01:00
New Revision: 1b1b5251479c42c793b14fb9588545f9619b85d6

URL: https://github.com/llvm/llvm-project/commit/1b1b5251479c42c793b14fb9588545f9619b85d6
DIFF: https://github.com/llvm/llvm-project/commit/1b1b5251479c42c793b14fb9588545f9619b85d6.diff

LOG: [clang][dataflow] Use `Formula::isLiteral()` in a couple more places. (#78404)

Added: 
    

Modified: 
    clang/lib/Analysis/FlowSensitive/SimplifyConstraints.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/SimplifyConstraints.cpp b/clang/lib/Analysis/FlowSensitive/SimplifyConstraints.cpp
index 00a3104a57b6ba3..cc20202768b9275 100644
--- a/clang/lib/Analysis/FlowSensitive/SimplifyConstraints.cpp
+++ b/clang/lib/Analysis/FlowSensitive/SimplifyConstraints.cpp
@@ -131,9 +131,9 @@ void simplifyConstraints(llvm::SetVector<const Formula *> &Constraints,
     for (const auto *Constraint : Constraints) {
       const Formula &NewConstraint =
           substitute(*Constraint, Substitutions, arena);
-      if (&NewConstraint == &arena.makeLiteral(true))
+      if (NewConstraint.isLiteral(true))
         continue;
-      if (&NewConstraint == &arena.makeLiteral(false)) {
+      if (NewConstraint.isLiteral(false)) {
         contradiction();
         return;
       }


        


More information about the cfe-commits mailing list