[PATCH] D76096: [clang] allow const structs to be constant expressions for C

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 20 11:59:32 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: clang/test/Sema/builtins.c:181-186
+  ASSERT(!OPT(test17_c));
+  ASSERT(!OPT(&test17_c[0]));
+  ASSERT(!OPT((char*)test17_c));
   ASSERT(!OPT(test17_d));        // expected-warning {{folding}}
   ASSERT(!OPT(&test17_d[0]));    // expected-warning {{folding}}
   ASSERT(!OPT((char*)test17_d)); // expected-warning {{folding}}
----------------
`test17_c` and `test17_d` are both declared as `const char [4];` not sure why this case would differ


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76096



More information about the cfe-commits mailing list