https://github.com/rjmccall requested changes to this pull request.

I'm sorry for failing to notice this in my previous review, but I don't think 
this patch is right.  A global initializer should be FP-constrained based on 
whether the variable is defined in an FP-constrained context.  This is testing 
whether the outermost level of the initializer is a call to an FP-constrained 
constructor.  That means that we will not treat the initializer as FP 
constrained if it's not of class type or if it calls a non-FP-constrained 
constructor but passes arguments that require FP-constrained code emission.  
(It will also be wrong if the expression requires temporaries, because then the 
expression will not be directly a `CXXConstructExpr`.)

If we don't currently capture in the AST whether a global variable definition 
is in an FP-constrained context, that seems like something we should fix.

https://github.com/llvm/llvm-project/pull/74883
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to