[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 9 09:19:20 PDT 2020


Mordante created this revision.
Mordante added reviewers: aaron.ballman, dblaikie, rsmith.
Mordante added a project: clang.
Herald added a subscriber: dexonsmith.
Mordante requested review of this revision.

When casting an enumerate with a fixed bool type the casting should use an IntegralToBoolean instead of an IntegralCast.

Fixes PR47055: Incorrect codegen for enum with bool underlying type


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85612

Files:
  clang/lib/Sema/SemaCast.cpp
  clang/test/AST/ast-dump-enum-bool.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85612.284216.patch
Type: text/x-patch
Size: 48418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200809/860a7f90/attachment-0001.bin>


More information about the cfe-commits mailing list