[PATCH] D48100: Append new attributes to the end of an AttributeList.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 25 14:35:45 PDT 2018


rsmith added a comment.

This patch appears to have at least caused us to process attributes too many times in some cases. For example:

  __attribute__((noreturn,noinline,unused)) void f();

before your patch gives this with `clang -Xclang -ast-dump`:

  `-FunctionDecl 0xccef1e0 <<stdin>:1:1, col:50> col:48 f 'void () __attribute__((noreturn))'
    |-UnusedAttr 0xccef280 <col:34> unused
    `-NoInlineAttr 0xccef2c8 <col:25>

and after your patch gives this:

  `-FunctionDecl 0xb913740 <<stdin>:1:1, col:50> col:48 f 'void () __attribute__((noreturn))'
    |-NoInlineAttr 0xb9137e0 <col:25>
    |-UnusedAttr 0xb913828 <col:34> unused
    |-NoInlineAttr 0xb913838 <col:25>
    `-UnusedAttr 0xb913848 <col:34> unused


Repository:
  rC Clang

https://reviews.llvm.org/D48100





More information about the cfe-commits mailing list