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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 9 21:30:31 PDT 2020


rsmith added inline comments.


================
Comment at: clang/test/AST/ast-dump-enum-bool.cpp:1
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump=json %s | FileCheck %s
+
----------------
aaron.ballman wrote:
> riccibruno wrote:
> > Why a (pretty unreadable) json test? There is also `make-ast-dump-check.sh` to auto-generate an ast dump test.
> I'd also like to see some CodeGen tests for various fixed underlying types that ensures the conversion to the underlying type happens before the conversion to the enumeration.
> 
> Also, at least one test showing this behaves properly with a C-style cast instead of a named cast.
In addition to CodeGen tests, we should also test that constant evaluation does the right thing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85612



More information about the cfe-commits mailing list