Mordante marked 3 inline comments as done. Mordante 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 + ---------------- rsmith wrote: > 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. @riccibruno Thanks for the hint! I wasn't aware of this tool. I've modified the AST test. @aaron.ballman I've added a C-style AST test and CodeGen tests. However I'm not sure what you expect to see in the CodeGen tests. As I expected the CodeGen doesn't know about the enum, but it just uses the underlying type of the enum. Please let me know if you want to see additional tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85612/new/ https://reviews.llvm.org/D85612 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits