giulianobelinassi wrote:

@erichkeane So, looking why the `asm` attribute is written after the visibility 
attribute, I see on 
https://github.com/llvm/llvm-project/blob/92266681bfc89b71d1846b68da296186cd8bfbec/clang/lib/Sema/SemaDecl.cpp#L8128
 :
```
  ProcessDeclAttributes(S, NewVD, D);
```
which creates the VisibilityAttr. Then later on 
https://github.com/llvm/llvm-project/blob/92266681bfc89b71d1846b68da296186cd8bfbec/clang/lib/Sema/SemaDecl.cpp#L8223

```
if (Expr *E = D.getAsmLabel()) {
    <...>
    NewVD->addAttr(AsmLabelAttr::Create(Context, Label, SE->getStrTokenLoc(0)));
}
```

Which then creates the `asm` attribute.  Hence the ASM attribute is created 
after visibility attributes at least.  The question now is which attributes can 
be placed before an `asm` attribute which may resulted in this code layout.

https://github.com/llvm/llvm-project/pull/162556
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to