[clang] [analyzer] Respect symbol complexity bound in tryRearrange (PR #227367)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 04:47:59 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.
----------------
necto wrote:
Is there a consequence of the proper adherence to the symbol complexity limit? Like some formula becoming `UNKNOWN` because now you properly refuse to construct a symbol? If there was a test like that, it would be easier to understand what is broken when it signals a regression.
https://github.com/llvm/llvm-project/pull/227367
More information about the cfe-commits
mailing list