[PATCH] D98104: Update __is_unsigned builtin to match the Standard.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 8 14:54:49 PST 2021


rsmith added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:1207
 * ``__is_union`` (C++, GNU, Microsoft, Embarcadero)
 * ``__is_unsigned`` (C++, Embarcadero)
+  Returns false for enumeration types. Note, before Clang 13, returned true for
----------------
Please add a trailing colon to this line to match the other lines with additional text after the parentheses.


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:4834
     // Floating points should always return true.
-    return !T->isEnumeralType() && (T->isFloatingType() || T->isSignedIntegerType());
+    return T->isFloatingType() || (T->isSignedIntegerType() && !T->isEnumeralType());
   case UTT_IsUnsigned:
----------------
Please reflow this line so it fits in 80 columns.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98104



More information about the cfe-commits mailing list