aaron.ballman added a comment.

I know we don't have to deal with `restrict` because that qualifies a pointer 
(so there's no way to use it with an anonymous struct), but are there others? 
There's `DeclSpec::TQ_unaligned` (which has no corresponding qualifier in 
`Qualifiers::TQ` despite the comment about keeping them in sync). Similarly, 
what about:

  struct S {
    _Atomic struct {
      int i;
    };
  }
  
  void foo(void) {
    struct S s;
    s.i = 12; // Is this an atomic assignment?
  }

Further, do we have to worry about things which are not type specifiers but 
still impact the declaration, like various type attributes?



================
Comment at: clang/test/AST/ast-dump-decl.c:132
 
+// CHECK: IndirectFieldDecl{{.*}} Test48755Const 'int'
+// CHECK-NEXT: Field{{.*}} 'const struct testIndirectFieldDecl::{{.*}}'
----------------
This looks wrong to me -- I would have assumed the type would be `const int` 
and not `int`, which would match the behavior if the type was directly 
qualified: https://godbolt.org/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95408

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to