[PATCH] D66862: Make lround builtin constexpr (and others)

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 14:54:57 PDT 2019


efriedma added a comment.

It's probably worth adding testcases for 0.5 and -0.5.  I think the current implementation behaves correctly, but it would be easy to mess up with a small change to the code.

Are you intentionally excluding `__builtin_lroundl`/`__builtin_llroundl`?



================
Comment at: clang/lib/AST/ExprConstant.cpp:9625
+
+    return Success(IVal.getExtValue(), E);
+  }
----------------
getExtVal call here is unnecessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66862





More information about the cfe-commits mailing list