================
@@ -199,6 +199,25 @@ static llvm::APSInt convertBoolVectorToInt(const Pointer 
&Val) {
   return Result;
 }
 
+static bool CheckFloatResult(InterpState &S, CodePtr OpPC,
+                             const APFloat &Result, APFloat::opStatus Status) {
+  if (S.inConstantContext())
+    return true;
+
----------------
hubert-reinterpretcast wrote:

It seems to me that the whole point of the function is to produce error 
messages when the resulting status means that the expression is not a valid 
constant expression when it needs to be one. The function would not generate 
any error messages when the early return is taken. It would surprise me greatly 
if there was no requirement for the expression to be a valid constant 
expression when `S.inConstantContext()` is true.

https://github.com/llvm/llvm-project/pull/194327
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to