aaron.ballman added inline comments.
================ Comment at: clang/lib/AST/Interp/Interp.h:438-441 + // FIXME: This code Just Works[tm] for floats, but it's probably not doing + // the right thing. At least the diagnostic could be better without + // the conversion to an APInt. + ---------------- tbaeder wrote: > aaron.ballman wrote: > > I'm confused -- why would negation be UB for a floating-point type? For > > integer types, it's a matter of not being able to represent the value when > > the source is `INT_MIN`. > No idea, this was just something that came to mind when I wrote the code. If > it's not an issue, that's even better can I can just remove the comment. I think we should probably assert that the failure only occurs for integer types and not other arithmetic types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148987/new/ https://reviews.llvm.org/D148987 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits