[all-commits] [llvm/llvm-project] 4e6d30: [clang] Note that optnone and target attributes do...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Fri May 3 13:50:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e6d30e2c17fa2be3bc5106c2541fddb62b2d4ee
      https://github.com/llvm/llvm-project/commit/4e6d30e2c17fa2be3bc5106c2541fddb62b2d4ee
  Author: Reid Kleckner <rnk at google.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M clang/include/clang/Basic/AttrDocs.td

  Log Message:
  -----------
  [clang] Note that optnone and target attributes do not apply to nested functions (#82815)

This behavior is true for all attributes, but this behavior can be
surprising for attributes which have function-wide effects, such as
`optnone` and `target`. Most other function attributes affect the
prototype or semantics, but do not affect code generation in the
function body. I believe it is worth calling this out in the
documentation of these function-wide attributes. There may be more,
these were the two that came to mind.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list