[PATCH] D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions.

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 17 05:44:44 PDT 2021


ASDenysPetrov added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:245-246
+    ///
+    /// Complexity: O(N^2)
+    ///             where N = size(What)
+    RangeSet castTo(RangeSet What, APSIntType Ty);
----------------
ASDenysPetrov wrote:
> vsavchenko wrote:
> > That is a bit of a red flag because instantly my intuition tells me that there should be a linear option.
> Unfortunately, `castTo` is N^2 because technically we can call `unite`(which is N) inside it N times.
Corrected.
Unfortunately, castTo is N^2 because technically we can call unite(which is **N+M**) inside it N times.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103094/new/

https://reviews.llvm.org/D103094



More information about the cfe-commits mailing list