[clang] [analyzer] Respect symbol complexity bound in tryRearrange (PR #227367)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 06:28:16 PDT 2026


================
@@ -289,14 +289,14 @@ static std::pair<SymbolRef, APSIntPtr> decomposeSymbol(SymbolRef Sym,
 
 // Simplify "(LSym + LInt) Op (RSym + RInt)" assuming all values are of the
 // same signed integral type and no overflows occur (which should be checked
-// by the caller).
-static NonLoc doRearrangeUnchecked(ProgramStateRef State,
-                                   BinaryOperator::Opcode Op,
-                                   SymbolRef LSym, llvm::APSInt LInt,
-                                   SymbolRef RSym, llvm::APSInt RInt) {
+// by the caller). May return UnknownVal if the symbol complexity threshold is
+// reached.
----------------
NagyDonat wrote:

Fair point :sweat_smile: I'll try to construct one.

https://github.com/llvm/llvm-project/pull/227367


More information about the cfe-commits mailing list