[PATCH] D156156: [clang] Implement constexpr evaluation for `__builtin_{add,sub}c`

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 11:58:57 PDT 2023


aaron.ballman added a comment.

Thank you for this! The code changes themselves look good to me, but there's a few minor things left to do. You should also update the documentation somewhere near https://github.com/llvm/llvm-project/blob/118f95b394655d9dd425575025eafc6b79c3d84c/clang/docs/LanguageExtensions.rst?plain=1#L2467 to make it clear that we support these builtins and that they are allowed in a constant expression (we're trying to improve our implementation-defined documentation as we update stuff). And you should also add a release note to clang/docs/ReleaseNotes.rst as well.



================
Comment at: clang/test/SemaCXX/builtins-multiprecision.cpp:1
+// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify %s
+// expected-no-diagnostics
----------------
Adding this just to be sure that the include below picks up the limits.h from the compiler and not the limits.h from the test system itself.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156156



More information about the cfe-commits mailing list