[PATCH] D114834: [clang][PR52088]Fix assertion failure when passing bool as the type of next parameter

Lucas Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 30 19:17:04 PST 2021


Lucas updated this revision to Diff 390886.
Lucas added a comment.

Checking with clang-format.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114834

Files:
  clang/lib/Sema/SemaExpr.cpp


Index: clang/lib/Sema/SemaExpr.cpp
===================================================================
--- clang/lib/Sema/SemaExpr.cpp
+++ clang/lib/Sema/SemaExpr.cpp
@@ -15902,10 +15902,9 @@
 
       // If the types are still not compatible, we need to test whether the
       // promoted type and the underlying type are the same except for
-      // signedness except for boolean. Ask the AST for the correctly corresponding
-      // type and see if that's compatible.
-      if (!PromoteType.isNull() &&
-          !UnderlyingType->isBooleanType() &&
+      // signedness except for boolean. Ask the AST for the correctly
+      // corresponding type and see if that's compatible.
+      if (!PromoteType.isNull() && !UnderlyingType->isBooleanType() &&
           PromoteType->isUnsignedIntegerType() !=
               UnderlyingType->isUnsignedIntegerType()) {
         UnderlyingType =


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114834.390886.patch
Type: text/x-patch
Size: 893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211201/165b68f2/attachment.bin>


More information about the cfe-commits mailing list