[PATCH] D95408: [Sema][C] members of anonymous struct inherit QualType

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 25 16:20:35 PST 2021


nickdesaulniers created this revision.
nickdesaulniers added reviewers: rsmith, aaron.ballman.
nickdesaulniers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

When declaring an anonymous struct with `const` or `volatile`
qualifiers, ensure the members of that anonymous struct are created with
that qualifier.

GCC behaves this way, and WG14 is currently discussing this behavior.

See also:

- https://bugs.llvm.org/show_bug.cgi?id=48755
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98826


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95408

Files:
  clang/lib/Sema/SemaDecl.cpp
  clang/test/AST/ast-dump-decl.c
  clang/test/AST/ast-dump-records.c
  clang/test/Sema/struct-decl-anonymous-members.c
  clang/test/Sema/struct-decl.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95408.319160.patch
Type: text/x-patch
Size: 5317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210126/27580d73/attachment.bin>


More information about the cfe-commits mailing list