[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

Joshua Cranmer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 4 13:01:16 PDT 2022


jcranmer-intel added inline comments.


================
Comment at: clang/lib/AST/Interp/Interp.cpp:487
+  if (S.inConstantContext())
+    return true;
+
----------------
Not sure I understand the conditions that cause `S.inConstantContext()` to be true, which gives me some cause for concern. Additionally, there's no tests covering the checks in the function.


================
Comment at: clang/lib/AST/Interp/Opcodes.td:502
+  let Types = [AluTypeClass];
+  let Args = [ArgFltSemantics];
+  let HasGroup = 1;
----------------
Integer-to-floating point conversion is dependent on rounding mode--consider `(float)UINT_MAX`.


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

https://reviews.llvm.org/D134859



More information about the cfe-commits mailing list