[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

Elena Demikhovsky via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 3 12:44:35 PDT 2018


delena added inline comments.


================
Comment at: lib/Sema/SemaChecking.cpp:3098
+  case AtomicExpr::AO__atomic_fetch_umax:
+    IsMinMax = true;
+    Form = Arithmetic;
----------------
jfb wrote:
> Should `__sync_fetch_and_min` and others also set `IsMinMax`?
__sync_fetch_and_min is not variadic and not overloaded. The types of arguments are defined with the builtin itself in the def file.
BUILTIN(__sync_fetch_and_min, "iiD*i", "n"). So it is checked automatically.

The other __sync_fetch* functions are overloaded and checked in SemaBuiltinAtomicOverloaded()


Repository:
  rC Clang

https://reviews.llvm.org/D46386





More information about the cfe-commits mailing list