[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 01:34:22 PDT 2023


Fznamznon added inline comments.


================
Comment at: clang/test/Sema/offsetof.c:79
+int x2[__builtin_offsetof(struct X2, X2::a) == 0 ? 1 : -1];
+int x3[__builtin_offsetof(struct X2, X2::X2) == 0 ? 1 : -1]; // expected-error{{no member named 'X2'}}
+
----------------
It probably makes sense to also add a test with static member of a class, like Aaron mentioned in GitHub - https://github.com/llvm/llvm-project/issues/64154#issuecomment-1653468938 .


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157201



More information about the cfe-commits mailing list