[PATCH] D149612: [Sema] avoid merge error type

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 19 23:11:09 PDT 2023


hokein accepted this revision.
hokein added a comment.

thanks, looks good to me.



================
Comment at: clang/test/Sema/merge-decls.c:96
+char d;
+char x[sizeof(d.data) == 8]; // expected-error {{member reference base type 'char' is not a structure or union}}
+char x[sizeof(d.data) == 4]; // expected-error {{member reference base type 'char' is not a structure or union}}
----------------
It would be helpful to mention the related github issue), can you rename the x to something like `test8_gh62447` ?


================
Comment at: clang/test/Sema/merge-decls.c:96
+char d;
+char x[sizeof(d.data) == 8]; // expected-error {{member reference base type 'char' is not a structure or union}}
+char x[sizeof(d.data) == 4]; // expected-error {{member reference base type 'char' is not a structure or union}}
----------------
hokein wrote:
> It would be helpful to mention the related github issue), can you rename the x to something like `test8_gh62447` ?
you can simplify the test further, `char x[d.undef == 8]` should be enough to trigger the crash.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149612



More information about the cfe-commits mailing list