[PATCH] D152813: [clang][dataflow] Create `Value`s for integer literals.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 15 08:30:32 PDT 2023


xazax.hun added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/Arena.h:89
+  /// `Value`. These literals are the same every time.
+  IntegerValue &makeIntLiteral(llvm::APInt Value);
+
----------------
gribozavr2 wrote:
> Should we be taking the type into account? If not, why not? Please add the type or document why the type isn't tracked.
What would happen if we try to create the same value (like 5) but with different bit widths? (E.g., 64 bit integer vs 32 bit integer). I suspect we might end up having the same value twice in our constant pool, which might be fine. Just wanted to double check what is the desired behavior.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152813



More information about the cfe-commits mailing list