[Utils] Add missing attributes in syntax files

Authored by awarzynski on Mar 5 2021, 9:36 AM.


[Utils] Add missing attributes in syntax files

Added the following attributes to all LLVM syntax files:

  • allocsize
  • cold
  • convergent
  • dereferenceable_or_null
  • hot
  • inaccessiblemem_or_argmemonly
  • inaccessiblememonly
  • inalloca
  • jumptable
  • nocallback
  • nocf_check
  • noduplicate
  • nofree
  • nomerge
  • noprofile
  • nosync
  • null_pointer_is_valid
  • optforfuzzing
  • preallocated
  • safestack
  • sanitize_hwaddress
  • sanitize_memtag
  • shadowcallstack
  • speculative_load_hardening
  • swifterror
  • syncscope
  • tailcc
  • willreturn

I generated that list by comparing:

  • Attributes.inc (generated from Attributes.td), and
  • the Vim syntax file: llvm/utils/vim/syntax/llvm.vim

My original intention was to focus on the Vim syntax file. Since other
syntax files are also out-of-date, I added these attributes (if missing)
to other files as well. Note that in the other sytnax files (i.e. for
Emacs, VScode and Kate), there will be other attributes missing too.

I've also sorted all attributes alphabetically. Otherwise it's really
hard to automate adding new attributes. And I think that it was the
original intent to keep all of them ordered alphabetically.

Differential Revision: https://reviews.llvm.org/D97627